Date post: | 19-Dec-2015 |
Category: |
Documents |
View: | 239 times |
Download: | 3 times |
2
What are Themes? Properties of Themes How to use Themes How are Themes stored? Installing new themes
Overview
3
Themes allow a user to conveniently configure the style and layout of their site.
A user can pick a theme that best fits the purpose of their web site.
What are Themes?
4
There are many things that you can do with themes to customize the experience of your own site.
Properties of Themes
5
Each user can actually enable their own theme, allowing each user to see the site differently.
This property is great if users want to customize properties of the site for their own convenience.
This is only possible if an administrator for the site allows this function
Users and Themes
6
Each theme has its own configuration for settings.
These settings range from allowing pictures to be shown in comments to disabling the site logo (more on this later).
Customizing Themes
7
Sub-Themes are themes that are related to parent themes.
Sub-Themes inherit their parents resources making it easier to create new themes.
Sub-Themes can be parents of othersub-themes.
Sub-Themes
8
A front-end theme is displayed when a normal user views the site.
A back-end theme is displayed when the administrator views the site.
Front-end/Back-end Themes
13
One of the easiest ways to change the layout of your Drupal site, is to edit an already made theme.
To do this, you can configure where different “Blocks” are located.
Each Block is assigned a region – where it is located on the Drupal site.
Each Theme has a different configuration, different Blocks in different regions.
Editing Themes
15
Here is an example of the different regions that blocks can be placed in.
All of this is defined in the Theme’s .info file.
The Presentation Layer
16
The only thing required for the theme, is a .info file.
If meta data, style sheets, JavaScipts, block regions etc. are all defined in the file.
The .info file
17
Template file (.tpl.php) – Used for the xHTML markup and PHP variables. They also may output other data types such as xml rss.
Template.php – For all the conditional logic and data processing. Can be used to hold preprocessors for generating variables before they are merged with markup inside .tpl.php files.
Note: None of these files are required for a theme.
Other important files
18
Themes have a unique storage compared to other sections in Drupal.
Themes do not contain their own table in the Drupal database. Instead the data is kept in a separate folder.
How are Themes stored?
20
Choose A Theme
You can find Drupal themes on their website.◦ http://drupal.org/project/Themes
Examples:
Installing new Themes
21
The Drupal website had a repository of user submitted themes.
Submitted themes are subject to design specifications, as well as coding conventions.
The Drupal Repository
22
Choose the correct file for your version.
Themes for previous versions are not compatible with newer ones.
Download the Theme
23
All you have to do, is extract the .gz file into your /drupal-6.17/themes directory.
No need to modify the database, or even the Drupal site. The new themes (once extracted) will appear automatically!
Installing new Themes