Gossamer Forum
Home : Products : Gossamer Links : Discussions :

If template statement

Quote Reply
If template statement
Hi



is such an if statement possible in the footer.html:

<%if template = home%>
<%include extra.html%>
<%endif%>
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] If template statement In reply to
Possibly. But I think it would need to be something like;

<%if template eq home%>

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [katabd] If template statement In reply to
<%if template eq 'home'%>

Perhaps. I can never remember if quotes are needed or not.
Quote Reply
Re: [Andy] If template statement In reply to
Thanks guys



the one that will work is:

<%if template = home%>
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] If template statement In reply to
You'll want eq .... = is for assignment rather than comparison

Last edited by:

Paul: Aug 6, 2002, 3:08 AM
Quote Reply
Re: [Paul] If template statement In reply to
Paul is right.

Plus, I don't think "template" is defined as a template tag.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] If template statement In reply to
Hi Yogi..

That is what i thought but the tag i mentioned is working just fine..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] If template statement In reply to
It will work because if (foo = bar) will always be true. Take this example (perl code):

Code:
my $one = 1;

if ($one = 2) {
print "OK";
}

Obviously 1 doesn't equal 2 but it will still print OK.