every page a different background

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
bullitshot
Forum Members
Forum Members
Posts: 57
Joined: Mon Mar 23, 2009 11:35 am

every page a different background

Post by bullitshot »

Hello!

I am working with CMSMS 1.6.6. I have my site quite ready but what I want is that every page has a different background.

I've been trying to do it with an IF statement but I can't work it out.

Can somebody help me?

Thanx!
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: every page a different background

Post by RonnyK »

Use something like....

http://forum.cmsmadesimple.org/index.ph ... l#msg91566

You will see that there is a $page_alias for the alias of the current-page. You can use that to select an image with that same name.

Ronny
bullitshot
Forum Members
Forum Members
Posts: 57
Joined: Mon Mar 23, 2009 11:35 am

Re: every page a different background

Post by bullitshot »

I tried to get it work a couple times last week but I can not seem to get it to work.

Can you / or somebody else help me more with this?

Thanx!
bullitshot
Forum Members
Forum Members
Posts: 57
Joined: Mon Mar 23, 2009 11:35 am

Re: every page a different background

Post by bullitshot »

Hello!

Still can not figger it out.

Spend quite some time on it but no result.

Anyone wants to help? I'll be willing to pay for it.

Thanx!
bullitshot
Forum Members
Forum Members
Posts: 57
Joined: Mon Mar 23, 2009 11:35 am

Re: every page a different background

Post by bullitshot »

It's all solved.. was quite simple.. the first tip with the capture tag threw my off and thinking too difficult

The answer is:



you set the name of the page equal to the name of the image header_news is page news

thats all
Post Reply

Return to “Layout and Design (CSS & HTML)”