There isn't an 'OR' in conditionals syntax that I know of. There is an 'or' I believe, though it's buggy so it could be better to use php (<?php if (strstr("{TID}", "tour.tpl") or strstr("{TID}", "details.tpl")) { ?>)
I typed it correctly... are you getting an error? To close it you can use </IF> if you like, but for the sake of consistency it's perhaps better to use <?php } ?>, which is what </IF> is automatically translated into at run time.
Comments on <IF templates/bootstrap/viewcomments.tpl contains tour.tpl OR
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hey Paul,
Is it me not formatting this correctly, or the script cannot handle multiple IF { TID } statements?
This is what I was trying:
< IF {TID} contains tour.tpl OR {TID} contains details.tpl >
tour.tpl is a custom template.
If I create a simple
< IF {TID} contains tour.tpl >
or
< IF {TID} contains details.tpl >
statement, they work fine. But I need to be able to do an OR in that single IF statement.
Thanks
David
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
There isn't an 'OR' in conditionals syntax that I know of. There is an 'or' I believe, though it's buggy so it could be better to use php (<?php if (strstr("{TID}", "tour.tpl") or strstr("{TID}", "details.tpl")) { ?>)
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Thanks Paul.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Hey Paul,
Just got around to actually trying this. Is this the correct syntax?
<?php if (strstr("{TID}", "tour.tpl") or strstr("{TID}", "details.tpl")) { ?>
I see that { at the end there. Is that supposed to be there? Not a PHP kinda guy, sorry.
Also, I just basically put this where? Instead of the whole <IF {TID} ....> ? If so, how do I close it? I mean, the </IF> tag in PHP is what?
Thanks
David
Forum Regular
Usergroup: Customer
Joined: Aug 05, 2005
Total Topics: 94
Total Comments: 272
strstr doesn't sound right either....
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I typed it correctly... are you getting an error? To close it you can use </IF> if you like, but for the sake of consistency it's perhaps better to use <?php } ?>, which is what </IF> is automatically translated into at run time.
Forum Regular
Usergroup: Customer
Joined: Jun 22, 2005
Total Topics: 91
Total Comments: 305
Cheers. All is working now!
Thanks again
David