Recently we were tasked with building a simple widget that would provide prospective students with suggestions for school programs based on a catalogue of pre-set keywords. The idea was to help visitors narrow down their choices based on a variety of criteria including program topics (e.g., "ecology", "modern languages") and personal interests (e.g., "research", "singing"). Since some visitors would certainly know a program by name, it would also look up matches on the title.
The following snippets will output some unique classes for a Drupal 7.x menu based on whether or not child menus are present. There are a number of reasons you might want to do this, but in our case we wanted to implement a Top Bar menu for Foundation 5.
This tutorial will take you through the steps of having your Drupal 7 content open up inside a lightbox overlay when it is selected from a view. We'll also throw in a permalink for convenience and SEO.
You should already have a basic working knowledge of Drupal theming and Views 3.
As far as website contact forms go, Drupal's core Contact module provides pretty much everything it should right out of the box. But what if you want to add more information to the page (mailing address, for example), or position the form as a block, say, in a sidebar? In the first case, you would have the form automatically load inside another page node (such as we've done with our own Contact us page). In the second, you could create an empty block and attach the contact form to it. Here's how:
There are a few of us control freaks DIY types who prefer to tinker with things at the source, even if it takes a little more time and effort. But since most people will likely opt to install the excellent Superfish Drupal module, which will essentially have you set up in a couple of clicks, this post is more of an excuse to illustrate a few theming basics; for instance:
how to use a theme function to override Drupal's default HTML output,
how to alter rendered output using a preprocessor function,
We'll use the plugin's "Basic" menu in this example. The fine tuning is up to you.