views

Beautiful, Easy Maps in Drupal using Views and Mapstraction

I've been asked about the Archdiocese of St. Louis's online parish search mapping functionality enough times that I finally made a quick video walkthrough of how it was done. The video below explains it all—basically, we use the Location module to attach addresses to nodes and geocode (get lat/lon) the addresses, and we use Views + Mapstraction to make the spiffy maps all over the site.

The functionality was originally set up by the kind folks at Palantir, and tweaked a bit over time by me to make what you see today.

You can watch the video in HD on Vimeo, to see fine details. (Recorded with iShowU HD).

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