Free Website Hosting

Quick & Dirty Guide For Creating a Custom Drupal Theme

Posted on 28 December 2011. Tags: custom drupal theme, drupal, drupal theme, drupal web hosting
Quick & Dirty Guide For Creating a Custom Drupal Theme

Drupal is one of the favorites when it comes to content management. This is because it is open-source, which means that you can freely alter it any way you want. It is for this very reason that its community of active members continues to increase thereby making it robust and versatile through user contributions and ongoing development.

One of the first things that you should learn about when using Drupal is themes. A theme is essentially a collection of commands and files that comprise the design templates of Drupal. If you want to change the way that your website looks, you should know how to customize a theme. This short tutorial assumes that you already have a background in design and programming.

  1. Open a text editor and create the files below:
    • nameoftheme.info (replace nameoftheme with your desired theme’s name)
    • style.css
    • style-rtl.css
    • page.tpl.php
    • node.tpl.php
    • comment.tpl.php
    • block.tpl.php
    • box.tpl.php
  2. Enter the HTML and CSS codes in the files above. Be sure to indicate values for the following template variables:
    • $content
    • $closure
    • $breadcrumb
    • $footer_message
    • $directory
    • $help
    • $head_title
    • $head
    • $is_front
    • $logo
    • $layout
    • $language
    • $messages
    • $mission
    • $primary_links
    • $node
    • $onload_attribute
    • $search_button_text
    • $search_box
    • $search_url
    • $search_description
    • $scripts
    • $styles
    • $secondary_links
    • $sidebar_right
    • $sidebar_left
    • $site
    • $site_slogan
    • $site_name
    • $title
    • $tabs 
  3. When you’ve entered the required values, save the file. 
  4. If there’s no logo yet for your theme, create one using a graphics software of your choice. Once you’ve made your customized logo, save it with the file name logo.png.
  5. Next, login to your chosen FTP client and go to the themes directory in Drupal. The address is typically this: “/sites/all/themes/”.
  6. Next, make a directory using your chosen name for your theme, such as “mytheme.”
  7. Go to the directory that you made in Step 5 and copy all of the theme files that you made and customized earlier.

Leave a Reply

Top 5 Drupal Hosting Companies

homenewsarticlestutorialsweb hosting reviewsaboutprivacycontactdisclosure