Concatenating web2py HTML Helpers

Say you want to produce something like this list of links dynamically, into an HTML page, from a web2py controller:

Here is what you would put into your controller to concatenate (append) HTML Helpers:
def index():
    page_info = DIV(
                A(‘NOAA Weather’, _href=’’), BR(),
                A(‘Google Mobile’, _href=’’), BR(),
                A(‘Twitter Mobile’, _href=’’)
    return dict(page_info=page_info)
Here is what would go into your associated view:
{{extend ‘layout.html’}}
Here’s the reason. Lot’s of HTML helpers are derived from the DIV helper. According to the web2py epydocs at line 523, DIV
"Behaves like a dictionary regarding updating of attributes. 
Behaves like a list regarding inserting/appending components."

#html-helpers, #web2py