Joomla 1.5: Using the Page Class Suffix in Template Code
Sometimes web designers need to access a page class suffix from directly within a template. A common reason to do this is to assign unique styles to individual pages linked from a menu (e.g. to change the dominant color on that page). By default Joomla applies the page class suffixes only to limited areas of a page, which often doesn’t offer enough flexibility. However, by making some simple changes to your template you can take advantage of the cascading nature of stylesheets to apply unique styles to any element on a page.
Load Suffix
First, we need to find out what the page class suffix is for the page we are visiting. To do this, you will need add some code to your template:
[custom_list type=”check”]
- Open your template’s index.php file (located in /templates/*template-name*/)
- Find the tag in the index.php, near the top area of the template
- Above this, insert one of the following code blocks (Either of the following options will work fine in most cases. However they work slightly differently, so in certain cases your needs may dictate a specific choice.)
[/custom_list]
(more…)