Book Image

Drupal 5 Themes

Book Image

Drupal 5 Themes

Overview of this book

Drupal is an award winning open source Content Management System. Based on PHP/MySQL, its power and flexibility combined with its exceptional design mean it is already on the way to becoming the de facto standard for CMS Websites. Drupal?¢‚Ǩ‚Ñ¢s modular design and structured source code make it both highly flexible and easily extended and modified. Drupal is extremely scalable, making it ideal for both a simple personal website as well as an industrial strength commercial or institutional web presence.Drupal is a model open source project in that it has a large, friendly community of people who contribute to the project in various ways. Drupal is not only free and easy to use, but this community provides on going mutual support.
Table of Contents (14 chapters)
Drupal 5 Themes
Credits
About the Author
About the Reviewer
Preface
Appendix A

Identifying Themeable Functions


There is no automated tool for the identification of the various themeable functions in Drupal. You can, however, identify them by their names, because all themeable functions employ a consistent naming convention. Themeable functions' names all begin with theme_ and they are located in the modules and includes directories. The naming convention makes it possible to work your way through the various files to isolate all the functions. You can ease the pain somewhat by setting up Dreamweaver or a similar program to do the searching for you.

Additionally, you can use the following snippet of PHP code from within Drupal to produce a list of the active functions on your installation.

<?phpprint '<ol>';
$functions = get_defined_functions();
foreach($functions['user'] as $function) {
if(substr($function,0,6)== 'theme_')
print "<li>$function</li>";
}
print '</ol>';
?>

To use this code, first create a new Block within your site. Set the...