Support Forums

Some help with an {if} statement please . .

This is a discussion on Some help with an {if} statement please . . within the Templates, HTML, CSS, and Design Help forums, part of the General category; I've got a small table of content I only want displayed on index.php but I'm struggling with my {if}{else} commands. ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 06-02-2009, 05:11 PM   #1
Just get on with it!
 
michael's Avatar
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 474
Rep Power: 31
michael is just really nice michael is just really nice
Default Some help with an {if} statement please . .

I've got a small table of content I only want displayed on index.php but I'm struggling with my {if}{else} commands.

Isn't it possible to just use {if}{/if} around my table without any {else}? Also, how exactly does smarty define index.php? I've been trying {"$smarty.const.URLS/index.php"} but that isn't working for me.

What would you put around the following to ensure it displays only on index.php?

<table>some content</table>

Many thanks,
__________________
M Michael
V4.2.1 Developer - Sigma Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline   Reply With Quote
Old 06-02-2009, 05:17 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,493
Rep Power: 132
Eric Barnes is just really nice Eric Barnes is just really nice
Default

If you are doing this in the layout.tpl I would just use:
{if $body=='home.tpl'}
show it
{/if}

Also no you do not have to have an else.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 06-02-2009, 05:27 PM   #3
Just get on with it!
 
michael's Avatar
 
Join Date: Jan 2007
Location: Milton Keynes, England
Posts: 474
Rep Power: 31
michael is just really nice michael is just really nice
Thumbs up

Thanks Eric. I'm sure I knew that in some dim recess of my brain . . .

__________________
M Michael
V4.2.1 Developer - Sigma Template


"All truths are easy to understand once they are discovered; the point is to discover them" - Galileo Galilei (1564 - 1642)
michael is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
{if} statement chrisst1 Technical Support 3 03-13-2009 12:58 PM
Need a bit of help with an if/else statement. michael Templates, HTML, CSS, and Design Help 5 10-09-2008 04:25 PM
Need help with an if/else statement on links. michael Templates, HTML, CSS, and Design Help 14 09-24-2007 11:00 AM


All times are GMT -4. The time now is 07:13 PM.


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