[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/rotterdam/template.pt
Make Rotterdam's template more resuable by defining some macros and
Philipp von Weitershausen
philikon at philikon.de
Tue Aug 3 16:26:05 EDT 2004
Log message for revision 26881:
Make Rotterdam's template more resuable by defining some macros and
slots on sensible places. Code using this template should not be
affected.
The macro system of ZopeTop is quite modular and better suited for
a custom skin's base. We should consider putting it back into X3.
Changed:
U Zope3/trunk/src/zope/app/rotterdam/template.pt
-=-
Modified: Zope3/trunk/src/zope/app/rotterdam/template.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/template.pt 2004-08-03 18:03:43 UTC (rev 26880)
+++ Zope3/trunk/src/zope/app/rotterdam/template.pt 2004-08-03 20:26:05 UTC (rev 26881)
@@ -40,14 +40,16 @@
<body tal:attributes="onload body_onload | nothing">
- <div id="global">
- <div id="userDetails">
+ <metal:slot define-slot="global">
+ <div id="global" metal:define-macro="global">
+ <div id="userDetails" metal:define-slot="user_details">
<metal:block define-macro="logged_user">
<span tal:omit-tag="" i18n:translate="">User:</span>
<tal:block replace="request/principal/title">
User
</tal:block>
</metal:block>
+ <metal:block define-slot="login_logout">
<a href=""
tal:attributes="href string:@@logout.html?nextURL=${request/URL/url:quote}"
tal:condition="python: hasattr(request.principal, 'getLogin')"
@@ -56,12 +58,16 @@
tal:attributes="href string:@@login.html?nextURL=${request/URL/url:quote}"
tal:condition="python: not hasattr(request.principal, 'getLogin')"
i18n:translate="">[Login]</a>
+ </metal:block>
</div>
<img tal:attributes="src context/++resource++zope3logo.gif" />
</div>
+ </metal:slot>
- <div id="navigators">
+ <metal:slot define-slot="navigators">
+ <div id="navigators" metal:define-macro="navigators">
+
<!-- Navigation tree box -->
<metal:tree use-macro="context/@@standard_macros/navigation_tree_box" />
@@ -80,7 +86,7 @@
</tal:block>
<!-- Tree of the help topics that appears on the help namespace -->
- <div class="box" id="help"
+ <div class="box" id="help" metal:define-slot="online_help"
tal:condition="not:python:request.getURL().find('++help++')==-1">
<h4 i18n:translate="">Online Help - TOC</h4>
<div class="body">
@@ -92,12 +98,13 @@
</div>
</div>
+ </metal:slot>
+ <div id="workspace" metal:define-macro="workspace">
- <div id="workspace">
-
+ <metal:slot define-slot="breadcrumbs">
<div id="breadcrumbs" metal:define-macro="breadcrumbs"
- > <div tal:omit-tag="" i18n:translate="">Location: </div><tal:block
+ > <div tal:omit-tag="" i18n:translate="">Location:</div> <tal:block
repeat="breadcrumb context/@@absolute_url/breadcrumbs"
><a href=""
tal:condition="repeat/breadcrumb/start"
@@ -111,9 +118,10 @@
href string:${breadcrumb/url}/@@SelectedManagementView.html">
breadcrumb item</a> / </tal:block>
</div>
+ </metal:slot>
- <div tal:condition="python: macroname == 'view'" class="itemViews"
- metal:define-slot="tabs">
+ <metal:slot define-slot="tabs">
+ <div tal:condition="python: macroname == 'view'" class="itemViews">
<tal:block repeat="view context/@@view_get_menu/zmi_views">
<a href=""
tal:attributes="href view/action;
@@ -131,8 +139,7 @@
<div tal:condition="python: macroname == 'view'" id="actions"
tal:define="help_actions context/@@view_get_menu/help_actions;
actions context/@@view_get_menu/zmi_actions;
- dummy python:actions.reverse()"
- metal:define-slot="tabs">
+ dummy python:actions.reverse()">
<span tal:condition="help_actions"
tal:repeat="help_info help_actions"
@@ -169,8 +176,9 @@
</span>
</div>
+ </metal:slot>
- <div id="viewspace">
+ <div id="viewspace" metal:define-slot="viewspace">
<div metal:define-slot="message" id="message">
</div>
@@ -197,9 +205,9 @@
</div>
- <div id="context_information">
+ <div id="context_information" metal:define-slot="context_information">
- <div id="helpers">
+ <div id="helpers" metal:define-slot="helpers">
<div class="box" id="itemHelp" tal:condition="pagetip|nothing">
<h4 i18n:translate="">Tip</h4>
@@ -247,11 +255,10 @@
<div id="footer" metal:define-macro="footer" />
- <div id="logger" />
+ <div id="logger" metal:define-slot="logger" />
</body>
</html>
</metal:block>
-
More information about the Zope3-Checkins
mailing list