In order to have a layout according to our choice we create a layout file in the template folder which form the basis for placing different module. Now I have requirement in which the home page or front page as it is referred in Joomla Template there will be a left and right placeholder of equal width i.e 50%, but the left and right for other pages will be 70%, 30%.
The coding in the present template supports 70%, 30% for all the pages including frontpage.
Code: Select all
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
$this->_basewidth = 30;
$positions = array (
'left1' =>'',
'left2' =>'',
'left-mass-top' =>'',
'left-mass-bottom' =>'',
'right1' =>'',
'right2' =>'right',
'right-mass-top' =>'',
'right-mass-bottom' =>'',
'content-mass-top' =>'content-mass',
'content-mass-bottom' =>'',
'content-top' =>'',
'content-bottom' =>'',
'inset1' =>'',
'inset2' =>'left'
);
$this->customwidth('inset2', 25); //<== override right1 column width to 25%. Must call before call definePosition. Can call many time to override many columns.
$this->definePosition ($positions);
?>
Code: Select all
$this->_basewidth = 30; //if i change here from 30 to 50, the width changes to 50 for all pages
Please Help....
Thanks
Dipak