Archived

Difference between revisions of "Upgrading a Joomla 1.5 template to Joomla 2.5"

From Joomla! Documentation

Line 25: Line 25:
 
The name="" type=" default="" label="" description="" attributes still apply.
 
The name="" type=" default="" label="" description="" attributes still apply.
  
== General Notes Regarding Changes ==
+
== Sitename ==
  
 
<code><?php echo $mainframe->getCfg('sitename');?></code> is now <code>$app->getCfg('sitename');</code> Where <code>$app = JFactory::getApplication();</code>
 
<code><?php echo $mainframe->getCfg('sitename');?></code> is now <code>$app->getCfg('sitename');</code> Where <code>$app = JFactory::getApplication();</code>
  
 
[[Category:Joomla! 1.6]]
 
[[Category:Joomla! 1.6]]

Revision as of 15:36, 31 May 2010

This page has been archived. This page contains information for an unsupported Joomla! version or is no longer relevant. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Documentation all together tranparent small.png
Under Construction

This article or section is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well. If this article or section has not been edited in several days, please remove this template.
This article was last edited by Betweenbrain (talk| contribs) 13 years ago. (Purge)

Template Parameters[edit]

In both Joomla! 1.5 and 1.6 template parameters are defined in templateDetails.xml.

Whereas in 1.5 parameters are defined as part of the <params> section, and each parameter is defined as a <param>, in 1.6 template parameters are contained in the <config> section and treated as a <field> nested within the <fieldset> and <fields> tags, as illustrated below.


    <config>
        <fields name="params">
            <fieldset name="basic">
                <field name="" type=" default="" label="" description="">
                    <option value="1">On</option>
                    <option value="0">Off</option>
                </field>
                <field name="" type="" default="" label="e" description="" />
            </fieldset>
        </fields>
    </config>

<fieldset name="basic"> wraps the parameters in a slider and using name="basic labels that slider as "Basic Options" and name="advanced" labels it as "Advanced Options".

The name="" type=" default="" label="" description="" attributes still apply.

Sitename[edit]

<?php echo $mainframe->getCfg('sitename');?> is now $app->getCfg('sitename'); Where $app = JFactory::getApplication();