${resources_for('head')} ${resources_for('bodytop')} ${self.body()} ${resources_for('bodybottom')} <%def name="resources_for(section)"> % if c.resources and section in c.resources: % for resource in c.resources[section]: ${resource.display()} % endfor % endif