Flexible Content Management System


Automating $thename

Contributed by I think its a great on Nov 28, 2001 - 03:02 PM

Taking from the $ModName trick which is often used in the modules you can add the following line:

$thename = basename( dirname( __FILE__ ) );

This reads the theme's directory (just like PostNuke does) and inserts it into your theme's links and image tags.

Thereby allowing the site manager to change the theme's name (the directory name) without actually editing the theme.