views

Set a View's Context Inside an Organic Group

A very simple way to allow a view to display as if it were a page in an organic group on your Drupal site: Simply paste the code below in your view's Header or Footer, using the PHP Code input format.

<?php
og_set_group_context
(node_load(46405));
?>

Note: the node ID inside node_load() must be set to the group into which you'd like the view to display. To get this to function perfectly (as of OG 2.1), you might need to apply the patch in this issue on drupal.org: Group theme doesn't display on Views that take group as an argument. (Otherwise the group's custom theme might not get set).

There are some alternative methods to getting views to display inside groups, but this is a quick and easy solution.

Drupal Views Filters: Making Exposed Searches User-Friendly

One of the main new features of the Archdiocese of Saint Louis' website (to launch on February 22!) is the much-improved parish and school searching capabilities. There are many facets to these sections of the site; everything is built using the combination of nodes built with CCK, Views, and Mapstraction (for Google Map interfaces).

Parish Search by Name

One of the main annoyances with most implementations of parish and school searching that I've found (and I've tested almost every U.S. Archdiocese's website for this functionality) is the fact that searches are extremely rigid - if you don't type in the exact terms for the title of the parish in the parish database, you won't get any results.

For instance, type in "St. Luke," and you might get a result for St. Luke parish. However, type in "Saint Luke," and you get nothing. Or, what if you type in "Saints Joachim and Anne," but the parish is in the database as "Sts. Joachim & Anne"? Continue Reading »

Syndicate content