Re: YATS (Yet another templating system)

From: Date: Tue, 15 Feb 2000 20:28:15 +0000
Subject: Re: YATS (Yet another templating system)
Groups: php.template 
Request: Send a blank email to php-template+get-40@lists.php.net to get a copy of this message
> So basically just by assigning multiple values to the section variables > you make them loop, correct? > yes. couple of different ways to assign. > > > > Syntax: > > > > {{variable_name}} or > > {{variable_name key1="val1" key2="val2"}} > > What do key1 and key do? > sorry, bad example. They don't do anything. It is merely showing the html-ish key/val syntax. Currently valid values are 'alt' and 'repeatscalar'. > > Automatic Hiding > > > > If any variable is not found within a section, the entire section will > > be hidden. This can be useful when there is surrounding text (such as > > a table row) that should only be displayed if the variable is found. > > Child sections are also hidden. > > This should be configurable. > Actually you must specify autohide="yes" if you want this behavior. Even then, you could always use an alt in your variables to keep it from hiding. Perhaps you meant the child sections also being hidden should be optional, but if so I wouldn't agree, as it perverts the meaning of what a section is. > I think what templates should also have is: > - comments > yes. So far I've been content with html comments, but you are right. > - possible support for loading config files (I'm undecided on this > now) > not sure what this buys. Why can't it be done via PHP code? What's it got to do with display? > - possible optional evaluation of the template if it has embedded > PHP code (that's how you would do includes) > I toyed with this idea. Allowing embedded PHP code probably means that the templates will begin to look much like regular HTML files with PHP embedded. At that point, you've lost your separation between logic and display. -dan

Attachment: [text/x-vcard] Card for Dan Libby danda.vcf
« previous php.template (#40) next »