Groups
Sign in
Groups
web.py
Conversations
About
Send feedback
Help
Site Layouts with parameters
34 views
Skip to first unread message
Ferran Fontcuberta
unread,
Jan 21, 2010, 11:41:19 AM
1/21/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web.py
It is possible to pass parameters to base layout, like the title or
something like this?
Pablo Antonio
unread,
Jan 21, 2010, 11:45:41 AM
1/21/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to we...@googlegroups.com
On Thu, Jan 21, 2010 at 1:41 PM, Ferran Fontcuberta
<
fer...@fompi.net
>
wrote:
It is possible to pass parameters to base layout, like the title or
something like this?
You can set properties in the template that you use as content. For example, take
a look at this layout template:
http://github.com/crazy2k/pfweb/blob/master/templates/layout.html
The title is taken from the template which is passed as parameter. An example
of a "content" template is this:
http://github.com/crazy2k/pfweb/blob/master/templates/index.html
And here's how you make your rendering function use layout.html as a base
template:
http://github.com/crazy2k/pfweb/blob/master/pages.py
Hope it helps,
--
Pablo A.
http://www.pablo-a.com.ar/
mengu
unread,
Jan 25, 2010, 1:34:47 AM
1/25/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web.py
actually django handles this with base request context. does webpy
have any plan on supporting something like this?
Reply all
Reply to author
Forward
0 new messages