Tuesday, October 5, 2010

A Brief Drupal Theme Tutorial

This tutorial is not meant as an end all training session for learning drupal theme, but more as a beginner of bare bones user guide drupal novice. Not necessarily means to teach someone to issue their sites, but to give the basic idea as the subjects and why and what the main file of each theme.
So that you don't know anything about Drupals theming, well though not necessarily have to, it's always a good idea to know a little about working your cms. Drupal uses what they call themes to control the look of a site. The site is usually divided into some core components and the output is basically a theme. What this means, well your Drupal site is primarily your PHP files with some HTML and CSS. With a little knowledge of these you can control the overall appearance of the site. Drupal uses basically a model when you create each page out of the information in the database.These files keys control the appearance of comments, nodes, blocks and a few other areas of the site. edit these files can have a dramatic change in the appearance of your site.
Basically there are some files that all themes for Drupal (a few) have have more a page.tpl.php
This is the layout of the main pages, which contains snippets of PHP and HTML that the rest of your power theme files when creating the page.
There's a comment.tpl.php, this file contains the information for your comments in Drupal.
node.tpl.php, ok you probably guessed, the file we decide what each node will look like.
Box.tpl.php you grant a box around your content.
Style.CSS this is a main style sheet you can control sites. with this file so that you can spend an entire day trying to figure out what affects every class and ID.
There are some other files generally in every theme, but these are the workhorses. Other files include information about the file, the file of the logo and a screen.
Now you have an idea of what your theme do basic file. take some time and check each file individually, try to understand how it works Is through and interact. modifying these files and adding to them that you can begin creating your own themes. There is nothing wrong with one of drupals contributed themes and using them to start working on your own.







Remember the creating Drupal themes is easier if build out what you already have.

No comments:

Post a Comment