minor additions today

0 views
Skip to first unread message

mindplay.dk

unread,
Mar 15, 2008, 1:02:52 PM3/15/08
to php-outline
added a small library of useful modifiers today - all the usual stuff,
like escaping output for html and javascript, encoding urls, etc.

also added support for using the {else} tag within a {foreach} block,
as a means of displaying a default message, for example, when an array
is empty.

some thoughts:

I could make {else} work with {while} as well - so that, if the while-
loop doesn't execute at all (e.g. it's false from the get-go) you can
execute a different action. Not sure if this would be really useful or
make any sense?

Another idea is a {modify} block, which would apply any modifier to a
block of output, e.g.:

{modify html}<your html here>{/modify}

This would apply the "html" modifier to any block of output. This
would give you an easy means of applying any number of modifiers to
larger blocks of content. Would this be easier or more useful than
simply using capture, and then applying modifiers to the captured
content? (the resulting compiled code would be the same...)
Reply all
Reply to author
Forward
0 new messages