Joomla! Discussion Forums



It is currently Fri Nov 27, 2009 3:55 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
Posted: Sun Nov 23, 2008 7:14 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Mar 22, 2008 12:58 pm
Posts: 9
hello,

I am using a custom template to display 5 pages.

the right side of the page is an image and left side is the mainbody();

Mainbody has a background image.

I need to change this background image for different pages.

Page 1 has background 1
Page 2 has background 2 and so on..

Thanks


Top
  E-mail  
 
Posted: Tue Dec 02, 2008 2:39 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Feb 05, 2007 9:32 am
Posts: 51
Location: Winchester, UK
I too would like to know the answer.
Please someone answer this query.
Thank you

_________________
§


Top
  E-mail  
 
Posted: Thu Jan 08, 2009 5:14 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Sep 24, 2008 3:22 pm
Posts: 21
Each page will have a different Itemid with your Joomla site.

If you allocate a class to body in the php, suffixed with the item-id
eg. <body class="page<?php echo $Itemid; ?>">

Then you can specify diferent backgrounds for each page in CSS
eg. body.page1 {background:....}
body.page2 {background:....}

Hope this is of help Mike.


Top
  E-mail  
 
Posted: Thu Jan 08, 2009 5:58 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Mon Feb 05, 2007 9:32 am
Posts: 51
Location: Winchester, UK
Mike, thanks for your help.

_________________
§


Top
  E-mail  
 
Posted: Fri Oct 30, 2009 9:04 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Oct 30, 2009 8:59 am
Posts: 2
I still cant get it to work.. could anyone please be more specific about where I should add the code's etc.

for example, the Itemid of my page is 5, so the code in the php should be

<body class="page1<?php echo $Itemid=5; ?>">

the CSS would be

.body.page1 { background: url(../images/testbg.png); }

but it still does not work... could anyone help me out?

p.s. I'm not quite sure where to exactly put the PHP code...


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 9 guests


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

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group