[albatross-users] Query regarding frames
Andrew McNamara
andrewm at object-craft.com.au
Thu Nov 21 11:08:48 EST 2002
>I have a question. If i have a mainpage that has frames, how can I get
>the templates within the frame to be interpolated ?
There are a couple of ways this can be done - Dave initially suggested
using the RandomPage mixin, and including some tag in the URL to tell
the application which frame was being rendered. I ran into problems
with this because RandomPage issues redirects from time to time, and my
paranoid browser through someone was trying to trick it.
Instead, I include arguments in the URLS like this:
<frameset rows="30%,*" cols="*">
<frame src="popview.py?list=1" name="list">
<frameset cols="104,*">
<frame src="popview.py?buttons=1" name="buttons">
<frame name="detail">
</frameset>
<noframes>
Sorry, this document can be viewed only with a
frames-capable browser.
</noframes>
</frameset>
Then, in the page class's display_page() method, I call a different
ctx.run_template(...) depending on what's in the request.
Hope this helps (and makes sense). 8-)
--
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
More information about the Albatross-users
mailing list