OFF-TOPIC:

I know I've used this somewhere (probably Django), although your
particular example is a bit odd... It's more correct to do this
instead:

$if items:
    <ul>
    $for....
    </ul>
$else:
    <p>Empty results</p>


On Mon, Jan 18, 2010 at 1:32 PM, andrei <[email protected]> wrote:
> I've found in several templating systems this syntax, that can be
> handy sometimes:
>
> $def with (items)
>
> <ul>
> $for item in items:
>    <li>$:render.item(item)</li>
> $else:
>    <li>Empty results</li>
> </ul>
>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/webpy?hl=en.
>
>
>
>



-- 
Branko Vukelić

http://foxbunny.tumblr.com/
http://www.flickr.com/photos/16889...@n04/
http://www.twitter.com/foxbunny
http://github.com/foxbunny
-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.


Reply via email to