Show top level terms in a term type view

I recently needed to create a view of type "Term" that displayed taxonomy terms and their description for a certain vocabulary.

The setup for that was quite simple

  • Create a view of type "Term"
  • Add an argument of Vocabulary ID
  • Add a field of  "Term Name" and another of "Term Description"
  • Add a filter of "Vocabulary" and select the vocabularies you want to restrict to

This gives a nice simple view of all terms belonging to a single vocabulary when the vocabulary id is passed as an argument.

Rewrite a Views query

Recently, due to Views lack of ability to OR it's filters together and due to some serious constraints in relation to arguments and relationships, I found myself needing to figure out how to rewrite the SQL of a Drupal view so that I could get the records that I needed.

It seems like there are two ways to do this. You can either rewrite the SQL directly, or try to hack the query object that views provides.

A quick Google search and I ended up on Drupal.org

Theming multiple value CCK fields in Views

I'm working on a site right now that has a Publications content type, which in turn has a multiple value CCK text field for Author. If more than one author was input I needed them to display as a comma separated list in a view. How do you go about modifying this? My first stop was the theming info link in Views, and that helped me narrow it down to a template file to use, views-view-field.tpl.php().

Subscribe to RSS - Views