Techy

Display Taxonomy Terms Separately by Vocabulary in a Drupal Theme

By default, all taxonomy terms for a node are displayed in one variable. A small function will allow you to display them separately.

There may be times when you want to display taxonomy terms for a node separately for a specific vocabulary. Or perhaps you only want to display the terms for a specific vocabulary and hide others.

In most themes, the taxonomy terms for a node are displayed via the $terms variable in a node template (node.tpl.php, etc.). With a little bit of Drupal theme development and customization of your theme, you can display the node's taxonomy terms separately by vocabulary - or display some and not display others.

The following is code that can be added to the template.php file in your theme. You can replace "phptemplate" with your theme name or leave it as is. If your theme already has a preprocess node function, then you can simply add it into the function.

Ubercart Custom Price Module Can Be Used for Non-Price Adjustments Too

This is just a really brief post about the Ubercart Custom Price module (http://drupal.org/project/uc_custom_price). As the name suggests, it was primarily intended for custom adjustments to the price of a product. This is can be used in many different ways, whether its using CCK textfield values, Ubercart product attribute values, or in other ways. For example, one could count the number of letters in a textfield and then alter the price or use the value of an product attribute.

Stuck Cron in Drupal - Clear the Cache Too

After deleting necessary variables in Drupal database to deal with a stuck Cron, clear the cache as well.

If you've ever had Cron get stuck in Drupal and wondered what to do, you've probably run across instructions to clear some variables in your Drupal database - specifically the cron semaphore. That generally solves the issue. But, if you've tried that and have not found it fixes the issue, there's another seemingly simple but useful step. Before you do anything else after deleting the the necessary variables, go to the Performance tab in Drupal and clear your cache. This will help ensure that the variables you just cleared don't go right back in!

See Additional Results in Search Engine Referrers Module for Drupal

A simple example of a change in module code to provide additional control in viewing results with the Search Engine Referrers module in Drupal.

The search Engine Referrers module for Drupal is a module that allows you to see recent search engine queries that led visitors to your website. As the module's project page on Drupal states, the Search Engine Referrers module is intended to be very simple and lightweight. It does not create additional database tables or log entries. It simply provides a display of certain existing data already stored in Drupal.

The module's settings allow you to see up to 50 most recent entries per search engine. We currently use a modified version of the module on Web New Castle. You may find that if you only check statistics periodically (like us) or if you have a high volume, you want to see more than it's current limit.

About Web New Castle

WebNewCastle actively contributes to collective Drupal development and is one of the most active participants on Ubercart.org.

We Are a Specialized Drupal Web Development Boutique.

Sign up for our newsletter for periodic information on Drupal, Ubercart, SEO, business marketing, and more. Please enter your email address below. You can unsubscribe at any time and we never share your email address.
Matthew Winters with Web New Castle

Web New Castle is led by Matthew Winters, an online community professional by background and now specializing in Drupal. See more about Matt Winters.

Drupal Theme Development Assistance - support through email, phone, code - $125