This tutorial is not meant as an end all training session for learning to theme drupal, but more as a bare bones beginner guide for the novice drupal user. It is meant not necessarily to teach someone to theme their own sites but to give the basic idea of how the themes work and why and what the main files of each theme do.
So you don't know anything about Drupals theming, well although you don't necessarily have to, it is always a good idea to know a little about the workings of your cms. Drupal uses what they call themes to manage the look and feel of a site.
The site is generally broken down into a few basic components and the output is basically themed. What does this mean, well your Drupal site is mostly php files with some HTML and CSS. With a little knowledge of these you can control the total look of your site. Drupal uses basically a template when it creates each page off of information in your database. These key files control the look of comments, nodes, blocks and a few other areas of the site. Altering these files can have a dramatic change in how your site looks.
There are basically a few files that all Drupal themes have (Some have more) a page.tpl.php
This is the main layout of your pages, it contains php snippets and HTML which the rest of your theme files feed when building the page.
There is a comment.tpl.php , this file contains the info for your comments in Drupal.
node.tpl.php , ok you probably guessed it, its the file that decides what each node will look like.
box.tpl.php Gives you a box around your content.
style.css This is your sites main style sheet. You can control so much with this file that you could spend a full day trying to figure what each class and id affects.
There are a few other files generally in each theme but these are your workhorses. Other files include your logo file, info file, and a screen shot.
Now you have a basic idea of what your theme files do. Take some time and check out each file individually, try to understand how they work and interact. It is through changing these files and adding to them that you can start to create your own themes. There is nothing wrong with taking one of drupals contributed themes and using them to start work on your own.
Niciun comentariu:
Trimiteți un comentariu