[Zope] Frames and zope page templates

Sean Hastings whysean at softhome.net
Thu Sep 23 14:08:41 EDT 2004


> Can you use frames or iframes in zope page templates?

Here is some code that works for me to generate a title/navigation frame and
content frame:

<html>
  <head>
    <title tal:content="python:here.getSiteName()">SITE NAME GOES
HERE</title>
  </head>

  <frameset tal:attributes="rows python:'%s,*'%(getattr(here,
'title.gif').height)" FRAMESPACING="0" FRAMEBORDER="0" BORDER="no">

    <frame src="navigation_template_html" scrolling="no">

    <frame src="firstView" name="content_frame">

  </frameset>
</html>



The rows attribute of the frameset is set based on the size of the title
graphic. The page Template "navigation_template_html" has navigation buttons
that target the content_frame. The function "firstView" calls a different
page template for different users based on permissions and preferences.

--Sean



More information about the Zope mailing list