A theme is a collection of files that define the presentation layer. You can also create one or more "sub-themes" or variations on a theme. Only the .info file is required, but most themes and sub-themes will use other files as well. The following diagram illustrates the files that are found in a typical theme and sub-theme.
Drupal 6
theming requirements
Drupal 7
theming requirements
.info (required)
All that is required for Drupal to see your theme is a ".info" file. Should the theme require them, meta data, style sheets, JavaScripts, block regions and more can be defined here. Everything else is optional.
The internal name of the theme is also derived from this file. For example, if it is named "drop.info", then Drupal will see the name of the theme as "drop". Drupal 5 and below used the name of the enclosing folder of the theme.
Info files for themes are new in Drupal 6. In version 5, .info files were used solely for modules.
template files (.tpl.php)
These templates are used for the (x)HTML markup and PHP variables. In some situations they may output other types of data --xml rss for example. Each .tpl.php file handles the output of a specific themable chunk of data, and in some situations it can handle multiple .tpl.php files through suggestions. They are optional, and if none exists in your theme it will fall back to the default output. Refrain from having complex logic in these files. In most cases, it should be straight (x)HTML tags and PHP variables. A handful of these templates exist in directories where core and contributed modules exist. Copying them to your theme folder will force Drupal to read your version.
Note: The theme registry caches information about the available theming data. You must reset it when adding or removing template files or theme functions from your theme.
template.php
For all the conditional logic and data processing of the output, there is the template.php file. It is not required, but to keep the .tpl.php files tidy it can be used to hold preprocessors for generating variables before they are merged with the markup inside .tpl.php files. Custom functions, overriding theme functions or any other customization of the raw output should also be done here. This file must start with a PHP opening tag "http://drupal.org/node/337173
"Drupal is a free software package that allows an individual or a community of users to easily publish, manage, and organize a wide variety of content on a web site."
Tuesday, January 10, 2012
Module: - ImageCache
ImageCache allows you to setup presets for image processing. If an ImageCache derivative doesn't exist the web server's rewrite rules will pass the request to Drupal which in turn hands it off to ImageCache to dynamically generate the file.
http://drupal.org/project/imagecache
http://drupal.org/project/imagecache
Subscribe to:
Posts (Atom)
only show translated menu items into current language (Drupal 8)
function MY_THEME_preprocess_menu(&$variables) { if ($variables['menu_name'] == 'brancott-header-menu') { $langu...
-
Add the following to template.php in themes/YourThemeName /* * Override filter.module's theme_filter_tips() function to disable tips ...
-
1. How do I access the Drupal admin panel, when the login block is disabled? Answer :- This is really a common question among...
-
There are many lists for the best Drupal SEO modules if you search Google. However, many of these lists do not cover modules ...