Documentation
Project Links
This is for versions of osCMax prior to 2.1 It is assumed that you have done the correct thing and created a new directory structure for your own template.
Edit catalog/templates/yourtemplate/mainpage.tpl.php as follows:
Just after the <body> tag - adjust widths to suit your template.
<body>
<?php define('BOX_WIDTH_LEFT', '170px');?>
<?php define('BOX_WIDTH_RIGHT', '150px');?>
Notice BOX_WIDTH_LEFT in the following:
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="2">
<?php
// Hide Left Column if not to show
if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_LEFT_OFF =='false') {
?>
<!-- left_navigation //-->
<?php require(bts_select('column', 'column_left.php')); // BTSv1.5 ?>
<!-- left_navigation_eof //-->
<?php
}
?>
Notice BOX_WIDTH_RIGHT in the following
<!-- content_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="2">
<?php
// Hide column_left.php if not to show
if (DOWN_FOR_MAINTENANCE == 'false' or DOWN_FOR_MAINTENANCE_COLUMN_RIGHT_OFF =='false') {
?>
<!-- right_navigation //-->
<?php require(bts_select('column', 'column_right.php')); // BTSv1.5 ?>
<!-- right_navigation_eof //-->
Save the following as catalog/templates/yourtemplate/column_left.php
<tr><td>
<div class="columnleftdiv">
<table >
<?php
$column_location = 'Left';
$column_query = tep_db_query('select configuration_column as cfgcol, configuration_title as cfgtitle, configuration_value as cfgvalue, configuration_key as cfgkey, box_heading from ' . TABLE_THEME_CONFIGURATION . ' order by location');
while ($column = tep_db_fetch_array($column_query)) {
$column['cfgtitle'] = str_replace(' ', '_', $column['cfgtitle']);
$column['cfgtitle'] = str_replace("'", '', $column['cfgtitle']);
if ( ($column[cfgvalue] == 'yes') && ($column[cfgcol] == 'left')) {
define($column['cfgkey'],$column['box_heading']);
if ( file_exists(DIR_WS_BOXES . $column['cfgtitle'] . '.php') ) {
require(DIR_WS_BOXES . $column['cfgtitle'] . '.php');
}
}
}
$column_location = '';
?>
</table>
</div>
</td></tr>
Save the following as catalog/templates/yourtemplate/column_right.php
<tr><td>
<div class="columnrightdiv">
<table >
<?php
$column_location = 'Right';
$column_query = tep_db_query('select configuration_column as cfgcol, configuration_title as cfgtitle, configuration_value as cfgvalue, configuration_key as cfgkey, box_heading from ' . TABLE_THEME_CONFIGURATION . ' order by location');
while ($column = tep_db_fetch_array($column_query)) {
$column['cfgtitle'] = str_replace(' ', '_', $column['cfgtitle']);
$column['cfgtitle'] = str_replace("'", '', $column['cfgtitle']);
if ( ($column[cfgvalue] == 'yes') && ($column[cfgcol] == 'right')) {
define($column['cfgkey'],$column['box_heading']);
if ( file_exists(DIR_WS_BOXES . $column['cfgtitle'] . '.php') ) {
require(DIR_WS_BOXES . $column['cfgtitle'] . '.php');
}
}
}
$column_location = '';
?>
</table>
</div>
</td></tr>
Edit catalog/templates/yourtemplate/stylesheet.css with the following - change the values to suit your template:
.columnleftdiv {
border: solid #ffffff 1px;
background-color: #cccccc;
}
.columnrightdiv {
border: solid #ffffff 1px;
background-color: #cccccc;
}
— Ridexbuilder 2010/07/28 03:33