I just check layout.html and found there place for menu. So it should not be the issue to plase at layout.html code like {{=myhead()}} and only issue will be valid return of myhead(). is it? On 6 янв, 21:36, mdipierro <mdipie...@cs.depaul.edu> wrote: > Yes and no. the web2py template language is very different from > Django's because everything inside {{...}} is pure python. This means > there is no concept of blocks but in python you have function calls. > > You can do > > #based.html > {{def something()}}text goes here{{return}} > {{extend 'layout.html'}} > Hello world > > #layout.html > <html><body> > <h1>{{something()}}<h1> > {{include}} > </body></html> > > The def defines a funciton that you can use as a block. > > On Jan 6, 6:13 am, Sujan Shakya <suzan.sha...@gmail.com> wrote: > > > I have some questions that I have not understood. > > > In layout.html, I found only one {{include}}. > > Is it possible to use more {{include}} in layout.html so that we can > > achieve equivalent of the following: > > {% block head %}{% endblock %} > > {% block content %}{% endblock %} > > {% block col3 %}{% endblock %} > > > How are the static files served in production servers? Are they served > > thru apache/lighttpd or web2py itself ? > > > And why is it that the use of routes.py not preferred? > > > Thanks.
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.