Posted by Merlin on Tue Jan 31, 2006 6:36 pm.
I bet it won’t surprise anyone that I might blog about Views, here and there. After all, I’ve spent a great deal of time with it, and I’m very excited about its potential, and what it can do.
As excited as I am by it, I do keep finding myself running up against various limitations.
- Views can’t easily add itself as a tab attached to someone’s account. The only reasonable way I can think to implement this is to do it as an external module.
- Taxonomy is so darn flexible that views actually can’t do some operations that appear simple, because to do them you have to assume things about taxonomy. One good example is simply displaying all terms attached to a node. Because SELECT queries require you to know exactly what kind and how much data you’re collecting, and taxonomy is inherently variable, this is difficult to do in a single select.
- It doesn’t support group by, though I think I can add that one without serious trouble.
- I don’t really have everything that needs to be in there for filters, especially in terms of operators and special types. For example, we have a ‘date’ type in forms api that Views can’t really take advantage of.
There’s also a long, long list of things I need/want to do to Views.
- Hiliting the Add Field/Argument/Sort/Filter box to make it less likely to be mistaken for a field/argument/sort/filter that already exists.
- User-filters. Example: Project module. I’ve made a start on this code, but it turns out to be fairly complex. What I’m doing is making it so that filters can be ‘exposed’, but part of the problem I run into is that an admin may not want to expose an entire filter (to which I fear I have to say ‘tough’, fix it in theme) and the other is that I haven’t completely implemented things like operators and dates. Dates are extra important for this kind of task, where they’re much less important for what Views currently does.
- Group-By — I’ve got a pretty good handle on how I want to implement this one now, though.
- Workflow, event, flexinode module integration. Flexinode may never happen; or it may happen only for the basicest of the basic types.
- views blog — a blog replacement based on views.
- views attach — a way to attach a view to any URL that has an argument. Example: user/X/bookmarks. Mostly it’s a question of making the tab appear, but it also requires rearranging things so that X becomes an argument to the view. The only way I can think to do it is as an add-on module.
- views feed manager — a way to declare which Views provide feeds, provide those feeds, and advertise those feeds.
- views bookmarks — this one is actually almost done, but I realized one thing I’m missing. Basically it creates a generic ‘mark’ that can be put on a node, on either a per user or a global basis. It’s just a flag, but you can then create views based on the flags. The flags can be named however the admin wants. (currently in CVS as views_bookmarks; I’m not sure it’s ready for primetime).
- views calendar — basically a replacement for the archive module. It requires the external filters above.
- Validation. Views barely validates the admin form, and I need to go back and do that. It’s not an insignificant task.
I’m sure there are other things I haven’t remembered that need to go on this list. It’s a lot of things to do. Anybody want to tackle any of ‘em? (particularly the external stuff).


Views Blog...
...is actually something that I tinkered with on and off earlier. I attempted to create custom views-exposed tables, but was stymied a while back. I'd like to give it another whirl when my current crop of consulting stuff is finished up.
What exactly did you have in mind? I know I whipped up a simple view a while ago that could display Drupal style blog/, blog/uid urls as well as blog/uid/YYYY/MM/DD URLs. The capability is already there for the existing blog.module functionality and more... It's just a matter of what else you'd want to do...
Views Blog
What I really envision has two node types. One node type is a 'blog', which contains:
A scaled back version of this would that information on profile fields, returning to the current "blog per user" model, which is still a step up from what we have today.
Taxonomy
Since I just posted one comment on the greatness of taxonomy, I thought I should follow up on this post.
The vocab data structure has a title and a description field (as does the term data structure).
The first point seems to be solved by basic node datastructure. Can you explain why it is different?
The next points (and perhaps the first one if I'm not understanding you fully) can be handled by one of the taxonomy access modules.
Taxonomy_theme module.
There are the component parts of this idea. Add in a view that displays all the posts with the "Joe's Blog" term, and Joe has a working blog, that can contain more than just old-skool blog.module posts. The blog could be limited to just blog.module posts by setting the vocabulary to only apply to blog.module types.
Voila: views blog, today.
The owner of the blog (node
Who owns a taxonomy term?
Ownership by implication
I can see two answers to this question:
(Both cases allow for multiple owners, a good thing in my opinion)
In the first case, ownership is implied by taxonomy access permissions.
In the second case, ownership is implied by the "edit vocabularies" permission. If we needed finer control, taxonomy would have to provide a permission for each vocab (or term, depending on the implementation).
If you want a strict 1:1 and on-to relationship between nodes and users, I think the solution would be a module that manages the "blogs" vocabulary, assigning a term to each user (e.g. "Joe's Blog" "Frank's Blog") by implementing hook_user. This module could also call into a taxonomy access module to handle the permissions.
Views as in a Rich Internet Application
I'd like to hear if there are any plans to support the following:
1) I'd like the option(!) to have views formatted in a grid (table) with "sort by" headers - so that when I click on the column header, the sorting of the list will change. (Ajax anyone?)
2) I'd like to have an interactive filtering mechanism for narrowing my search result. This is actually what you see in CiviCRM and lots of search applications. It should be optional on a view to have such a "search interface".
3) I'd like to have a "master-detail" form for the view - such that I find the say 25 first results - and show them in the view - with the option to page through all of the results (and perhaps item 1 and 2 also). When Selecting an item on the result list - I have a Detail form below/above/beside the list which shows more detailed data (configurable) about the item (so you'd probably have to load more data into the view, than just the columns shown in the list).
What I would like to be able to set up is a way to access - search and select - content from the Drupal database tables - and treat it as data.
Use Case: I have a user base. I want to find those users who have subscribed to a certain "item". I would like to only find those subscribers living in the UK, female and between the age of 20 and 40, who have entered an e-mail address.
When I have found my set of users who fulfill the criteria, I would like to export the list - with a configurable set of data (probably independently of the views data columns) - and end up with a CSV file to import into my spreadsheet, my contact list etc.
This is part CRM, part Business Intelligence.
It is a rich application. It extends the usefulness of the Views module with certain functionalities and interface elements.
I hope this makes sense. I'm n ot a programmer, but I'm a seasoned application designer, and if someone (you) find it worthwhile, I'd be happy to supply a more detailed description of this.
I wonder if this is less a views thing and more of a CCK thing - or if it sort of combines the two? Maybe the three numbered features are more like "objects" in a application development toolbox?
Best
What we got
Sure, that's one of Views' basic features; not without AJAX. It works like the forum where you can resort the forum by several fields.
This is a recent addition to Views known as 'exposed filters'. You can read about them in the Views documentation which actually exists now.
I'm not sure I fully understand this. Certainly the first part is there...you can view the nodes and go through them with a pager. You can view arbitrary data about the node, though how arbitrary is based upon what fields modules have made available to Views.
This one doesn't work because Views does nodes, not users. However, if anyone ever comes up with the a decent profiles-as-node module that works, and it contains Views support, then you can get this, because once you have the node you can search on it.
I'll be playing with Views
I'll be playing with the Views module - so that I can post interesting comments in the future.
Hope to catch up with you soon.
:-)
User profiles as nodes - not users
Idea: What if user profiles were nodes and not users? After all it is the profile data and other data regarding a user which you want to access. So if it is not the best idea to have users as nodes, maybe moving some of the profile data to a node would be a (part) solution? Profiles could at least hold demographic data. Statistics (user stats - accessed nodes etc.) would probably be harder to implement.
See, that right there is my
See, that right there is my biggest issue with taxonomy as a container.
Taxonomy makes it hard to create personal image galleries with image.module because that level of fine-grained permission with taxonomy 1) doesn't exist, and 2) would be awkward, administratively.
Also, I don't even know how to administer a taxonomy on a site with 5,000 users where each one has 5-7 of their own gallery terms. Just from a UI perspective.
TAC lite
There's a new module that addresses this short coming of TAC: http://drupal.org/node/53738
It allows for per-user control over term permissions. I don't find it awkward. I do find the lack of create/update/delete permissions a problem, and I am going to extend the module (http://drupal.org/node/54751) to include these necessary features.
I think the UI problem could be addressed if modules were really allowed to manage their own vocabularies. Right now, module can "own" a vocab, but taxonomy does actually do anything with that information.
Post new comment