CCK and Views - two titans kissing
By now, I think most people acknowledge that the CCK+views paradigm for Drupal site building is a runaway success. Part of the attraction of this paradigm comes from the deep integration between the two modules. They work great together.
This week, we saw (at least) two major advances in their integration.
CCK Field Permissions (in Drupal6)
My patch to CCK was committed by KarenS in record time (9 hours - yeah for Contrib). Now, admins can restrict the editing or viewing of fields to specific roles. Those without the permission will simply not see the field. This patch added two permissions for each field - edit and view. Edit affects the node form whereas view affects both all "read only' presentations like node teaser, full node, rss feed, and all Views as well. So you can use restrcted fields in a table View and only authorized people will see that column.
This role/permission based model is not the only way that people want to restrict fields. One other use case is to restrict fields based on the workflow state of the node. For example, the Issue field is only available if the article is in 'editor approved' state or higher. All of the pieces are now available to whomever wants to write that module. When you do, please contribute it!
Node/User Reference Fields and Views (in Drupal6)
When displaying a referenced node or user in a table View in Drupal5, we are restricted to just showing its title. Earl Miles and yched teamed up to bring us the all of the referenced node's fields in Drupal6. This makes for much more powerful table Views. I think this will simplify Organic groups Views integration as well since it's node => node relationship is very similar. The new Views has some very neat backend improvements in addition to its shiny new UI. Nice work, team.
- weitzman's blog
- 4356 reads



