300 likes | 673 Views
Themes. By Alex Loescher Robert Partch and Robert Pimentel. Overview. What are Themes? Properties of Themes How to use Themes How are Themes stored? Installing new themes. What are Themes?. Themes allow a user to conveniently configure the style and layout of their site.
E N D
Themes By Alex Loescher Robert Partch and Robert Pimentel
Overview • What are Themes? • Properties of Themes • How to use Themes • How are Themes stored? • Installing new themes
What are Themes? • 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.
Properties of Themes There are many things that you can do with themes to customize the experience of your own site.
Users and Themes • 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
Customizing Themes • 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).
Sub-Themes • 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 other sub-themes.
Front-end/Back-end Themes • 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.
Editing Themes • 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.
Configuring Blocks Push Button Zen
The Presentation Layer • 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 .info file • 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.
Other important files • 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.
How are Themes stored? • 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.
Database Storage User Table System Table
Installing new Themes • Choose A Theme • You can find Drupal themes on their website. • http://drupal.org/project/Themes • Examples:
The Drupal Repository • The Drupal website had a repository of user submitted themes. • Submitted themes are subject to design specifications, as well as coding conventions.
Download the Theme • Choose the correct file for your version. • Themes for previous versions are not compatible with newer ones.
Installing new Themes • 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!
Upload and Extract • Upload the theme file using SSH • /public_html/drupal-6.17/themes • Extracting:
Drupal Themes • Before Install • Administer Site Building Themes
Drupal Themes • After Install
Database Table • Before Install • Status shows if theme is enabled • 1 = Enabled 0 = Disabled
Database Table • After Install • New theme installed
Theme Install Recap • Choose A Theme • Drupal, Google • Download Theme • Upload & Extract • publict_html/drupal-6.17/themes • View Themes in Drupal • Administer Site Building Themes • Database Table • Find it in the System table in your Database