Re: [SMARTY] config variable type

From: Date: Wed, 18 Sep 2002 15:22:39 +0000
Subject: Re: [SMARTY] config variable type
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5992@lists.php.net to get a copy of this message
# monte@ispi.net / 2002-07-29 10:32:43 -0500: > By default, the Config_File class booleanizes these values, so > "yes,true,on" and "no,false,off" get converted to true or false (1 or 0). > > This way you can do things like: > > {if #calendarEnabled#} > .. > {/if} > > and you could have any one of these in your config file: > > calendarEnabled = yes > calendarEnabled = on > calendarEnabled = true > calendarEnabled = "yes" > calendarEnabled = "on" > calendarEnabled = "true" > calendarEnabled = no > calendarEnabled = off > calendarEnabled = false > calendarEnabled = "no" > calendarEnabled = "off" > calendarEnabled = "false" > > and they will all work like you would intend them to. i don't know if this hasn't been taken care of, but how about taking the quoted versions as literals, and the others as booleans? -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 5:21PM up 1 day, 35 mins, 22 users, load averages: 0.00, 0.03, 0.49 end

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