First and Last CSS class to Drupal blocks
If you're a themer looking to style blocks when its the first or last block in the region, use the following code snippet. This snippet works with Context module as well.Tags:...
View ArticleStyle Drupal node according to Teaser or Full page view
Allows you to theme nodes according to the view mode. This code provides more template suggestion for you to style. If you have for example content type "computer", you may copy node.tpl.php in your...
View ArticleStyle your Drupal theme according to day or night time
Here's a simple snippet to allow you to style your theme differently for day or night time. Place the following code into your theme's template.php file.Tags: drupaldrupal 7phpdaynightthemethemingtemplate
View ArticleThemer-friendly menu link CSS classes for Drupal theme
What this code does is to give themers an easier way to style individual menu items in Drupal. For example, if you have a menu item title "Company Profile" and you want this link to be red colour, the...
View ArticleEmbed Drupal block region into node page
Snippet to insert or embed Drupal block region into a node template.First of all, define the block region in your theme's .info file.YOUR_THEME.info...regions[BLOCK_REGION_NAME] = Block region...
View ArticleRemove the "No front page content has been created yet." in the default...
/** * Implements template_preprocess_page(). */function YOUR_THEME_preprocess_page(&$vars) { // Remove the "No front page content has been created yet.". if...
View Article