[solved] different background colour per page

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
stevegos

[solved] different background colour per page

Post by stevegos »

Hi

I hope this is the right area to post this to!

I wish to have a different background colour on a div on each page. Within each page I have added a css colour reference to the Extra Page Attribute 1 and then called it in my template as {$node->extra1}

But the colour being displayed is stuck on the first page (colour) displayed and never changes when selecting other pages (or it may be co-incidence its the first colour?)

I'm using the same colour referenced under the Extra Page Attribute to also set a different background colour on each menu item and that is working fine, but I just can't get it to work in the template.

Am I missing something?

All help greatly appreciated.

Steven
Last edited by stevegos on Sat Nov 03, 2012 6:49 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: different background colour per page

Post by calguy1000 »

See the {page_attr} plugin. {$node} is the variable typically used in a Menumanager template.

Code: Select all

</__body style="background-color: {page_attr key='extra1'};">...<__body>
would prolly be close.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
stevegos

Re: different background colour per page

Post by stevegos »

Perfect. Works great.

Thanks very much.
Locked

Return to “CMSMS Core”