Support Forums

Old 06-01-2009, 07:46 AM   #1
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 754
Rep Power: 20
bowers01 is on a distinguished road
Default Smarty In CSS

Hi,
With my new template on the homepage i dont want to display
Code:
background:url(images/header-bg.png) no-repeat;
in my css. Is there a way to not display it?
Is there something like {if $body=!'home.tpl'} that can be used in css?
I dont really want to have to make different css sheets for different pages.
Cheers,
Nick
__________________
Nick Bowers
68c v4.09 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 06-01-2009, 09:12 AM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,953
Rep Power: 115
Eric Barnes is a jewel in the rough
Default

Just assign that style to the body tag. Something like:
<body{if $body=='home.tpl'} class="home"{/if}>
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 06-01-2009, 10:10 AM   #3
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 754
Rep Power: 20
bowers01 is on a distinguished road
Default

Hi,
Thanks for the reply, i never though to do it that way because the code looks like this
Code:
#wrapper{
	width:1000px;
	margin:0 auto;
}
	#header{
		height:105px;
		background:url(images/header-bg.png) no-repeat;
	}
		#logo{
			width:371px;
			padding:41px 0 0 15px;
		}
			#logo h1{
				background:url(images/logo.png) no-repeat;
			}
				#logo h1 a{
					display:block;
					height:27px;
				}
					#logo h1 a span{
						display:none;
					}
i just tried adding
Code:
		#header2{
		height:105px;
	}
under #header and in the layout.tpl changed it to {if $body=='home.tpl'}<div id="header2">{else}<div id="header">{/if} but it doesnt load any header.
Any idea?
Cheers
__________________
Nick Bowers
68c v4.09 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 06-01-2009, 10:15 AM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,953
Rep Power: 115
Eric Barnes is a jewel in the rough
Default

Can you view source and see if it is actually changing the id on the div?
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Smarty help island1 HTML, CSS, and Design Help 2 01-09-2009 04:19 PM
Smarty functions seymourjames v4 Modules / Modifications 10 08-20-2008 06:54 AM
A bit of XHTML and Smarty seymourjames v4 Modules / Modifications 6 08-11-2008 03:44 PM
I need a hand on smarty please... canariasdata v4 Questions & Support 32 06-14-2008 05:26 AM
smarty.const.URL GSP v3.1 Questions & Support 2 11-17-2006 09:26 AM


All times are GMT -4. The time now is 09:31 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0