• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to add a bg img to a div, different on each page
PostPosted: Mon Aug 20, 2018 3:41 am 
Offline
New Member
New Member

Joined: Wed Aug 08, 2018 9:19 am
Posts: 7
Just using HTML and CSS, I would give each page an id (body id="index">, body id="contactus">) and so on, so that I could change the CSS if necesary for individual pages.

I have a #sidebar that contains a #picturediv. I need to put a different image on each page as a background to the text in the #picturediv.

How is this sort of thing done in CMSMS?

Thanks.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: How to add a bg img to a div, different on each page
PostPosted: Mon Aug 20, 2018 2:12 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3100
Location: The Netherlands
One rather common way to do this is to use:

Code:
</__body id="{$page_alias}">


Obviously {$page_alias} will be replaced with the alias of the specific page.

Other possibility would be the use of the 'Extra Page Attribute x' attributes (Options tab when editing a page) and https://docs.cmsmadesimple.org/tags/cms ... /page_attr


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: How to add a bg img to a div, different on each page
PostPosted: Tue Aug 21, 2018 10:09 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7678
Location: The Netherlands
https://cmscanbesimple.org/blog/assign- ... e-per-page

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting