Question for any Dolphin 7 template guru

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);
}

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 11 Apr 2011

Update: I was able to successfully override the hard coded styling by placing the css just befor the closing header tag in _header.html, but I'd still rather be able to override the function.  If it's not possible, the css in the header is a viable solution.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 11 Apr 2011

Where have all the template geniuses gone?

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 12 Apr 2011

Boo!

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 13 Apr 2011

I was going to say copy the function to the pageview script in the templates script directory which is how scripts are normally rewritten for templates, but noticed there isn't one. So that is not going to help.

So if i should happen to find a solution i will be sure to let you know.

https://www.deanbassett.com
Quote · 13 Apr 2011

I tried putting the function in several different files in the scripts directory, but nothing worked.  It just seems logical to me, that you should be able to modify some of the functions in BxDolPageView.php on a per-template basis.

I'm actually not sure why adding the css to _header.html works, while adding it to the css file themselves does not.  Anyway, I've got a 500px wide single column layout working reasonably well.  I do need to come up with a completely different top menu though.  500px just isn't enough to do the same type menu as a full width template.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 13 Apr 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.