Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Drupal 5 Themes

You're reading from   Drupal 5 Themes Create a new theme for your Drupal website with a clean layout and powerful CSS styling

Arrow left icon
Product type Paperback
Published in Dec 2007
Publisher Packt
ISBN-13 9781847191823
Length 260 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image