So you want to build a classy – swanky new Drupal website and have already checked out hundreds of responsive themes available out there but there’s none that meet your expectations. What do you do? You develop your very own custom Drupal theme from the ground up. Creating your own theme is not as complicated as it sounds if you have a fair knowledge in Drupal.
There are a plethora of powerful and sleek looking themes that you can install and use – both free and paid, like Bootstrap, Zen, Omega, AdaptiveTheme, Skeleton etc. Once installed, if you can figure out the files structure and which files to modify according to your design, you would probably need to locate and modify some lines of code. This can be very tricky and the entire design might just collapse like a house of cards if you mess something up. Building your own Drupal theme can be your saviour. So if you have a decent knowledge in Drupal, CSS and HTML you should find it interesting and fun to do it yourself!
Things to remember before Theming
To go about theming, you will need to design the appearance using tools like Photoshop, Illustrator etc. You will also need create a CSS file to control the layout and change the HTML output of Drupal in order to fit the design. So compiled below are a few key components you will need to keep in mind before you start your Drupal theme development:
These files are most vital while creating a theme. Without a .info file, Drupal will never know that you have created a custom theme. The .info file is basically meta data that will contain some basic valuable information about the theme, the files and features the theme will make use of.
So you will need to create a folder with a unique name under this directory - Sites/yoursitename/themes. Under your custom themes folder you can also create folders for Images and CSS files if you want to be more organized.
Template files mostly contain HTML and a little PHP code and this is where the real theming work happens. It controls the overall layout of your site and are defined with the extension “.tpl.php”. A page can contain a number of template files like page.tpl.php, region.tpl.php, node.tpl.php, block.tpl.php. Some of these template files like node.tpl.php and block.tpl.php can be re-used when presenting a page. So you will just have to create mark-up for them once and then keep using it whenever you want to.