I need to override the function shown below, which is located in /inc/classes/BxDolPageView.php Mainly I want to change the text highlighted in red, so that all columns will a fixed width of 500px. I need to do this for a fixed width template I am working on, and the template will allow all design boxes in any column after the first one, to wrap below the first column... essentially creating a one column layout. (Necessary, because 500 px is all the horizontal space that is available to display the site.
I can't override the styles in in CSS since the column widths for the 2nd and 3rd column are calculated and hard coded. What happens is, I can only control the width of the first column in CSS, but not any that follow. Does anybody know if this can even be done?
function genColumnHeader( $iColumn, $fColumnWidth ) {
$iColumnsCount = count($this -> aPage['Columns']);
if(count($this -> aPage['Columns']) == 1)
$sAddClass = ' page_column_single';
else if($iColumn == 1)
$sAddClass = ' page_column_first';
else if($iColumn == $iColumnsCount)
$sAddClass = ' page_column_last';
else
$sAddClass = '';
switch (preg_replace('/\d+/', '', $this->aPage['Width'])) {
case 'px':
// calc width in pixels
if ('px' == $GLOBALS['oTemplConfig']->PageComposeColumnCalculation) {
if ($iColumn == $iColumnsCount) // sum of all columns must not be more/less than page width
$sColumnWidth = ($this -> aPage['Width'] - array_sum($this->aColumnsWidth)) . 'px';
else
$sColumnWidth = round(($fColumnWidth * $this -> aPage['Width']) / 100) . 'px';
$this->aColumnsWidth[$iColumn] = (int)$sColumnWidth;
break;
} // else calculate in percentages below
case '%':
$sColumnWidth = $fColumnWidth . '%';
break;
}
$this -> sCode .= '<div class="page_column' . $sAddClass . '" id="page_column_' . $iColumn . '" style="width: ' . $sColumnWidth . ';">';
$sBlockFunction = 'getBlockCode_Topest';
$this -> sCode .= $this -> $sBlockFunction($iColumn);
}
