https://www.icyphoenix.com/viewtopic.php?f=29&t=3963
-----------------------------------
moreteavicar
Sun 30 Mar, 2008 00:22

027-0006 CMS Left And Right Column Widths
-----------------------------------
This perhaps isn't a bug, so much, as a potential source of annoyance / confusion, and I think this goes back a couple of versions of IP, but I couldn't see mention of it on this site (except where I recently mentioned it [url=http://www.icyphoenix.com/viewtopic.php?f=21&t=3822&start=30]Here.

Basically the column widths are completely overridden in the template files, e.g.:
templates/mg_themes/layout3_column.tpl

Left row is created under  <td width="180" valign="top">

Right row is also created under <td width="180" valign="top"> 

So no matter what people specify in the cms config page, it will be ignored.


-----------------------------------
Mighty Gorgon
Mon 07 Apr, 2008 00:18

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
I think this is not a bug.

You are pointing to standard CMS template not to the templates being used for global blocks.

Columns for global blocks are inserted in [b]portal_page_headerleft.tpl[/b] and [b]portal_page_tailright.tpl[/b] which should have the correct vars: [b]{HEADER_WIDTH}[/b] and [b]{FOOTER_WIDTH}[/b] respectively.

Let me know.


-----------------------------------
moreteavicar
Mon 07 Apr, 2008 01:12

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
No it doesn't work I'm afraid... I did see the variables in portal_page_headerleft.tpl and right, but as nothing happened when I played with the cms configuration, i assumed the layout page might have something to do with it (but as you say, that wouldn' effect site wide, but yes, it is the same width 180 on every page, whatever I set in CMS...) Thinking about it now, I'm wondering if perhaps when you changed $portal_config to $cms_config_vars, maybe this bit of the change is left out?


-----------------------------------
Mighty Gorgon
Mon 07 Apr, 2008 01:18

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
For what I can see the var is assigned and parsed correctly.

But I will do some extra check.

Vars are assigned in page_header.php and page_tail.php respectively:
[codeblock]	$template->set_filenames(array('portal_headerleft' => 'portal_page_headerleft.tpl'));
	if (cms_parse_blocks($cms_page_id, !empty($cms_page_id), $cms_wide_blocks, 'headerleft'))
	{
		$template->assign_var('HEADER_WIDTH', $cms_config_vars['header_width']);
		$template->assign_var('PORTAL_HEADERLEFT', cms_assign_var_from_handle($template, 'portal_headerleft'));
	}[/codeblock]
[codeblock]	$template->set_filenames(array('portal_tailright' => 'portal_page_tailright.tpl'));
	if (cms_parse_blocks($cms_page_id, !empty($cms_page_id), $cms_wide_blocks, 'tailright'))
	{
		$template->assign_var('FOOTER_WIDTH', $cms_config_vars['footer_width']);
		$template->assign_var('PORTAL_TAILRIGHT', cms_assign_var_from_handle($template, 'portal_tailright'));
	}[/codeblock]

If you try to insert a DIE just after those declarations you will see that the var is correctly passed:
[codeblock]die($cms_config_vars['header_width']);[/codeblock]

Are you sure you don't have something in the column which doesn't allow the column to be sized as you wish? (e.g.: text too wide...)


-----------------------------------
moreteavicar
Mon 07 Apr, 2008 01:23

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
Nope not that... you've got it right in page_header.php:
$template->assign_var('HEADER_WIDTH', $cms_config_vars['header_width']);

DB is also definitely being updated, so not sure why that portal header td is not being set... :?
Best thing would be to echo the val I guess ;)

BTW as said at the start, not so much a bug, but possible source of annoyance - because the main portal page layout is still fixed - why would somebody want a different width on every other global blocked page but the homepage default 3 / 2 column layout? Or was you thinking of changing the way the standard templates work so they also integrate with global blocks?


-----------------------------------
moreteavicar
Mon 07 Apr, 2008 01:24

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
Ha, I think we try and post at the same time! ;)


-----------------------------------
Mighty Gorgon
Mon 07 Apr, 2008 01:31

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
[quote user="moreteavicar" post="27397"]BTW as said at the start, not so much a bug, but possible source of annoyance - because the main portal page layout is still fixed - why would somebody want a different width on every other global blocked page but the homepage default 3 / 2 column layout? Or was you thinking of changing the way the standard templates work so they also integrate with global blocks?[/quote]
You're right but this is another point...

We should add options in the layout EDIT/ADD feature in CMS.

It should not be tough, I may have a play with it one day. :wink:


-----------------------------------
moreteavicar
Mon 07 Apr, 2008 01:35

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
:oops: I discovered why it isn't changing on the other pages... I forgot I defined another class for the left nav links in the stylesheet, as I was going to play with it... in there I fixed the width of the navbar... it is so long ago when I did it... that I totally forgot about it... sorry! (if you're wondering why fix it there, I had to fix the width in order to have cell images that changed with mouse-over, it had to be display:block... bit like what I did on one of my old stand-by sites: http://icps2007.awardspace.info/ICPS/ )


-----------------------------------
Mighty Gorgon
Mon 07 Apr, 2008 02:11

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
[quote user="moreteavicar" post="27406"]:oops: I discovered why it isn't changing on the other pages... I forgot I defined another class for the left nav links in the stylesheet, as I was going to play with it... in there I fixed the width of the navbar... it is so long ago when I did it... that I totally forgot about it... sorry! (if you're wondering why fix it there, I had to fix the width in order to have cell images that changed with mouse-over, it had to be display:block... bit like what I did on one of my old stand-by sites: http://icps2007.awardspace.info/ICPS/ )[/quote]
No problem for that.

What I do not understand is why you need the diplay property to be block... couldn't just use the CSS properties to change background? There are a lot of free script which demonstrate how to do that... If I didn't misunderstand what you need... :oops:


-----------------------------------
moreteavicar
Mon 07 Apr, 2008 03:10

Re: 027-0006 CMS Left And Right Column Widths
-----------------------------------
Ah well, I am using css properties to do exactly that, but if you want to do it with a cell image, and not just define a color, then can't just tile a link with an image, you need to have a fixed image width and use display:block - at least I found this to be the case a couple of years ago. I vaguely recall seeing some demonstration's by other people that did the same, and the links are then in their own td cells (which adds come complications to overall header for e.g., you need to put them in their own table) anyway thats all water under the bridge, maybe there is a better way, but I'm not really keen on using cell images anymore... I'm more into the less is more look ;)


