free
HomeContact usSitemap
Home arrow Joomla Corner
Joomla Corner
RocketTheme.com - 17 Joomla Templates *FULL* + *1.5 Updates* Print E-mail
Written by Administrator   
Thursday, 10 April 2008

Live Demo

Code:
http://demo.rockettheme.com/


***NEW: Chromatophore - April 08 FULL
Image
 
Download below
Last Updated ( Friday, 11 April 2008 )
 
j Joomla 1.5 Template Tutorial (Part6) Print E-mail
Written by Administrator   
Thursday, 10 April 2008

Advanced Templating Features

Joomla 1.5 offers a number of advanced template features that significantly expand what is possible with templates. We have already seen one example in this chapter, the ability to create custom chrome or output for modules.
Let's examine each of these in turn:

  • Template Parameters
  • Template Overrides

Template Parameters

New in 1.5 is the addition of template parameters for templates. This allows you to pass variables to the template from options selected in the administrative backend.

We can add a relatively simple parameter function to our template. In the templateDetails.xml file, add the following:

<params>
<param name="template_width" type="list" default="fluid" label="Template Width" description="Width style of the template">
<option value="fluid">Fluid with maximum and minimum</option>
<option value="medium">Medium</option>
<option value="small">Small</option>
</param>
</params>

You will also need a file called params.ini in your template folder. It can be a blank file, but Joomla needs this file to store what settings you have. For example, an INI file for the previous example might look like this:

template_width=2

You need to make sure that this file is writable so changes can be made. We will also need to add that as a file in the templateDetails.xml file.

In the Template Manager for that template, you will see the settings for the parameter, as shown in Figure 9.11.

 
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 15 - 21 of 219