using user id arguments in drupal menu items

It is a very common need to be able to enter a menu path similar to user/[uid]/profile in the Drupal menu system ([uid] being a dynamic argument for the user's id), but that's not possible out of the box, and there are no modules which provide this functionality.

Yesterday I got such functionality working by using the often-unknown custom_url_rewrite_outbound() function.


extending drupal templating

One of the most common questions on Drupal's theming forums is how to create an individual layout for a specific page or node. In this tutorial I'll show you how to do just that!

Let's start off by opening template.php in your theme's folder. If you do not have this file you're probably using a theme that is not powered by the phpTemplate templating engine, and as such, this tutorial will not be of much use to you.


creating new drupal regions

By default, Drupal comes with 5 content "regions": header, footer, left sidebar, right sidebar, and content. In many cases it is convenient to have several additional regions for more granular control over content location.

Sometimes we need to have certain blocks to always appear above or below the content, so let's add a few new regions!

For Drupal 5.x:

Open the template.php file in your theme's folder and add the following function:

  • Page 1