This should work fine

{{try:}}
{{for option in options:}}
<h1>{{=option}}</h1>
{{pass}}
{{except:}}
<h2>oops</h2>
{{pass}}

if you get an error it is usually because a line ending in : is not
paired up by a pass or because of unmatched {{ }} or because a block
is empty.

Massimo

On Dec 3, 5:50 pm, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote:
> What are you trying that you think it's not working?  Can you show the code?
> In general,  think like this:
>
> Write out "normal" Python code;
>
> add  {{ }}  around every line;
> Everywhere you have an UN-INDENT,  add a {{pass}}
>
> (you don't really need a pass everywhere, only where it's ambiguous - but
> that is a good starting point)
>
> On Wed, Dec 3, 2008 at 5:19 PM, Fran <[EMAIL PROTECTED]> wrote:
>
> > I've added a section within my layout.html with some loops like this:
> >  {{for option in options:}}
> >  {{pass}}
>
> > What I'd like is to have the ability to put either a {{try:}}
> > ((except:}} {{pass}} or an {{if setting:}} {{pass:}} around this.
>
> > This doesn't seem to work, so I guess there's a fundamental issue with
> > nested loops in the Views?
>
> > I've worked around my intiial problem (losing access to appadmin), but
> > I can foresee this being a really useful option to have available.
>
> > F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to