Tuesday, April 24, 2018 04:27 am EDT

Bri's blog

Bri's picture

Creating Drupal Template Suggestions

Chances are that you have wanted to create a new template as you work on your Drupal sites. Perhaps the blog page needs to have some markup that varies from your typical page.tpl.php template. Adding some lines of code to the template.php file inside the theme you are using can help you achieve this. By default Drupal will look for templates that match the name of a content type. For example, if you created a template called node-blog.tpl.php, Drupal would recognize it and load it on pages that contained blog content.

Bri's picture

Adding new Regions to a Drupal theme

Have you ever wanted to add a new region to the theme your using? Well in Drupal 6 you can, and it's not very difficult. A region is a section of your template where information, such as blocks, can be placed. By default there are 5 pre-defined regions. They are as follows:

Bri's picture

Changing the output of the $submitted variable using Drupal

As you might already know, you can pick which content types contain the $submitted by information that Drupal includes. If you are not already aware, you can go to admin/build/themes/settings/global and choose which content types you would like to have that information. As you add new content types, revisit this page to alter the settings.

Bri's picture

Enhanced Recent Comments Module

The drupal core comes with a Recent Comments module, as you probably already know. This module doesn't allow for any configuration options, so I simply added to it. The core module is a block module that simply shows the 10 most recent comments. But what if you only want to show 5 posts, or perhaps only show comments from a particular content type? Below are the changes that i made. The majority of this code came directly from the drupal core comment.module file.

Syndicate content