views


Theme views search results just like core

The views module is often used in place of or in addition to Drupal's core search module or other search modules when more control is required. By adding exposed filters, a site's visitors can narrow a search by the value of any field and many node object values.

The results can quickly be themed to highlight the search keys just like core search.

Add a views display as a tab to a forum listing.

I've been building the community pages for a client's site where one of the most popular areas is the forum. The design called for the forum listing to be the default menu tab with a second tab for searching the forum. I wanted to use a view with an exposed filter to search the site index and limit the results to this specific forum.

Illegal choice error in Views exposed filter of user reference field using a view of Organic Groups group members

Wow, how is that headline for a bunch of Drupal gobbledygook jargon?

To break it down, I have a content type with a cck user reference field.

That field's options are populated by the results of a view.

That view builds a list of users who belong to the same Organic group as the active user. It has a argument that supplies the user's group by default. That works fine because users can only belong to one group on this site.

But anonymous users don't belong to groups, so no results are returned.