Overview
The default skin/theme that comes with Jamroom - Cobalt - is configured for using dynamic page titles. If you are customizing a Jamroom Skin, using dynamic page titles is very simple and can be accomplished by making some slight modifications.
Configuration
The jr_overall_header.tpl file inside the skins/Cobalt directory contains the code for the titles of most pages in Jamroom. The line of code we are concerned with in this file is the following line:
<title>{$title|default:"Welcome to `$system_name`!"}</title>
You can change the "default" value of the {$title} variable in this line. If a {$title} variable is not found before this line of code, this value will be used as the title.
Step 1 - Open any template that uses the jr_overall_header.tpl template
Any template that makes any type of include call to the jr_overall_header.tpl template can have a dynamic page title. To add a page title, add the following parameter to the including function:
title="Your Title Here"
The entire function will now look similar to this:
{include file="`$SKIN_DIR`/jr_overall_header.tpl" title="Your Title Here"}
Each page that uses the jr_overall_header.tpl template can have a unique page title.
Step 2 (Optional) - Using Smarty variables
Any Smarty variables available in the template including the jr_overall_header.tpl file can be used in the page title. When using a Smarty variable in your page title, you must place backticks around it ( ` ). Note that using apostrophes ( ' ) is NOT acceptable when using variables; the variable will not work. On a standard keyboard, the backtick key is the same key with the tilde ( ~ ) sign, immediately above the Tab key and underneath the ESC key.
Additional Resources
|