Here is what changes was done in 1.5 version and what you should check and fix in your extensions or templates to be compatible with 1.5 version.
FIELDS ARRAY
You know that it used to be the $this->fields array that contained all fields values and also $this->ifields array with the same information but indexed by title of the field. In new version it is changed.
First you have to know that old way should continue working without any problems. So actually you do not need to change anything unless you wish to make your template 100% compatible or you start create new template.
New way to access field information directly is through $item object. No matter if it is list template or article template you finally get $item variable that contain article information.
For example in list template you get it like this.
for ($c=0; $c<count($this->items); $c++): $item = @$this->items[$c];
And in article template you get it like this
$item = $this->article;
That is like it always was. But here is new way how you can access field information directly like this
<?php if(@$item->fields[23]): ?> <span><?php echo $item->fields[23]->result; ?></span> <?php endif; ?>
1. Do not forget @ before $item variable. Because if field if not required and user not filled it out there will not be such index in fields array.
2. 23 is an ID of the field that you may find in the list of the fields of the article type. Index fields by IDs is much better than by titles. It turn out to be that sometimes there are different fields with the same titles in one type and not everyone can understand how to save custom template in UTF format in order for titles to be appropriate.
If you want list fields universally, then look joomla_blog template how it is done there.
Important to know that for Section Pack feature, if you want to pack templates to the Pack, you need to use this method only.
When user install your pack, in his Joomla DB fields IDs are different because he may already has same IDs that is saved in your pack. So new IDs assigned automatically and saved. Template after copy is processed with ereg_replace everything like ‘/->fields[([0-9]*)]/iU’ and ID will be replaced with just new assigned.
Also if in template parameters you use parameters to select field the parameter name SHOULD contact field_ in it. Examples tpl_map_field_address, tpl_field_logo. Then you may use this in template to call field
<?php echo $item->fields[$this->params->get(‘tpl_map_field_address’)]->result; ?>
To find out more about Section Pack, go to tools and run Section Pack tool to find out what it is.
FORM FIELDS
You know that form templates could accept $this->ifields variable for custom form templating. This will be supported in 1.5 but not native any more. Now only $this->fields array is official. And you can use it to call directly and fetch in cycle.
Example of direct access
<?php echo $this->fields[24]->result; ?>
And example of cycle you can find in default form template.
This is changed in all form templates and no longer will work correctly through old way of display field through
<?php ResViewRecord::renderField($field); ?>
But that is easy to fix. Just change all
<?php ResViewRecord::renderField($field); ?>
to
<?php echo $field->result; ?>
in you custom templates.
COLUMNS
If you created or want to create table style list template, then you should to know changes done to column variable.
First note that old columns way should continue to work also so this is for compatibility wish or new template.
There was 2 column variables. $this->cols and $this->cols_additional. It is not matter what was in there but now it is replaced with 1 variable named $this->columns. It is an array. Each element(column) contain array with 3 indexes.
foreach ($this->columns AS $column) { $title = $column['title']; $field_id = $column['id']; $field_params = $column['params']; }
Using this variable you can create universal list template of table stile. But it is not applicable really. The one universal template we have is enough almost everywhere.
If you make table style template better use direct fields call and fixed columns in table.
ARTICLE TEMPLATES
Now there is new feature. You can reposition comments in to article template. For example you want your article template be in 2 columns. 1st column is an article and 2nd column is a comments. You can do it easilyby placing following code anywhere in article template.
<?php if($this->params->get('comments')):?> <?php echo $this->loadTemplate('comments');?> <?php endif; ?>
Another feature is to load module just inside temple. It is also usefull for creating templates like Youtube where similar and the same author videos displayed and in Joomla that would be modules. Also for creating commerce sites for example you want to show “Those who buy this also buys” module in article detail only. It is hard to do with Joomla Itemid system. But if you call needed module just inside template you know that it will appear only in that particular place. And if user lose Itemid somehow (which is known fact it happens) it will be there anyway.
To call any module position use this
<?php echo load_module_position('myposition1', ‘table’); ?>
First parameter is the name of position to load and you can name it as you want. But not forget to add this position to your Joomla template XML file (templateDetails.xml) to <positions> tag to make this position available to place modules in to it. Second parameter is the style which is used to display module. It is absolutely the same parameter if you use it in Joomla template in style attribute like this
<jdoc:include type="modules" name="user1" style="rounded" />
It may have values: rounded, table, xhtml, horiz, none
TEMPLATE PACKS
When you style your template and you need any CSS for template just create .css file with the same name as template file and it will be automatically linked to page. The same rule applies to java script. If you have JS you can create .js file and it will be automatically loaded.
Store all your images that is used by template in folder with the same name like template file.
Those rules are required if you want to get proper Section Pack. Only this scheme allow guaranty include to Pack all of template and work correctly.
NEW ELEMENTS
Added 2 new elements that can be used in every template. It is a list of categories and user category.
<?php if($this->params->get('item_categories')):?> <span class="small"> <?php echo (count($item->categories) > 1 ? JText::_('Categories') : JText::_('Category')) ?>: (<?php echo implode(" | ", $item->categories);?>)</span> <?php endif;?> <?php if($item->user_category):?> <span class="small"> <?php echo JText::_('User Category') ?>: (<?php echo $item->user_category;?>) </span> <?php endif;?>
URLS
Important changes are in URLs creation. If you create URL to category or article you need to use
$link = MEUrl::link_list($category_id); $link = MEUrl::link_article($article_id, JRequest::getInt(‘category_id’));
$urls other than those should follow this rule.
1. To get correct Itemid use MEUrl::itemid(NULL, $category_id);
2. Add addition to any URL with MEUrl::linkAdditions($link);
Example
$link = 'index.php?option=com_resource&view=category&category_id=' . $category_id . '&Itemid=' . MEUrl::itemid(NULL, $category_id); $link = MEUrl::linkAdditions($link);
on
on 
+1 (209) 800 1209