Re: [SMARTY-GENERAL] If statements

From: Date: Mon, 01 Apr 2002 18:20:20 +0000
Subject: Re: [SMARTY-GENERAL] If statements
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3418@lists.php.net to get a copy of this message
You can't nest template tags, that is against syntax rules. This is in the FAQ. do this: {if $var eq "Y"} Monte Brad Atkins wrote:
Hello, I have the following code: [foreach item=SECTION from=$SECTIONS]
     [$SECTION.NAME]
[/foreach] SECTION has various elements such as NAME IMAGE LINK IS_SECTION etc... The IS_SECTION is of particular interest. The IS_SECTION contains a Y or an N, depend on whether or not it's a section or a category. Is it possible to do something like: [if [$SECTION.IS_SECTION] == "Y"] When I do that I get the following: Parse error: parse error in /var/www/virtuals/youreshop/dev/2002-smarty/hp/templates_c/50/5088fd25b0c0af451d7b67edd1bcedde/d41d8cd98f00b204e9800998ecf8427e.php on line 34 Any ideas? Thanks, Brad Atkins Manager, Technical Development Sales: 1-877-973-2278 Support: 1-877-973-4968 Email: brad@youreshop.com
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

« previous php.smarty.general (#3418) next »