One of the beauties about this (and the template language) in web2py was "no
manual needed for this!" -

That is, the template language is "just python", once you discuss
{{statement}}  syntax, and {{=variable}} output, and using {{pass} to
disambiguate indentation issues, all else is "just python".

The same is true for HTML tags:   any <tag> will (usually) have a TAG()
helper object, where the html tag attributes are named with a leading "_" in
the helper, that is  {{=DIV('Hello World', _id='this')}} outputs  <div
id="this">Hello World</div>

Two more things for "complete documentation ( ;-):

Output is safe - that is, when you use a helper class html is escaped.  This
is the primary reason to use helper classes over raw html (or a reason to
choose raw html vs. a helper).  If you _need_ to have raw output (unescaped)
you can wrap that piece in XML("<b>show me raw</b>")

Finally, if some tag you want is not defined in web2py, the generic form
TAG.name() will serve, e.g. you could have written this:
{{=TAG.div('Hello ', 'World', _id='this')}}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to