[CMF-checkins] CVS: CMF/CMFDecor/skins/zpt_generic - expanded_title.py:1.1 main_template.pt:1.15

Tres Seaver tseaver@zope.com
Mon, 19 Nov 2001 08:17:20 -0500


Update of /cvs-repository/CMF/CMFDecor/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv16200/CMFDecor/skins/zpt_generic

Modified Files:
	main_template.pt 
Added Files:
	expanded_title.py 
Log Message:


 - Remove use of '<span>' in the '<head>' section;  factor title
   computation into a separate script (tracker issue #412).


=== Added File CMF/CMFDecor/skins/zpt_generic/expanded_title.py ===
## Script (Python) "expanded_title"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Build title which includes site title
##
site_title = context.portal_url.getPortalObject().Title()
page_title = context.Title()

if page_title != site_title:
   page_title = site_title + ": " + page_title

return page_title


=== CMF/CMFDecor/skins/zpt_generic/main_template.pt 1.14 => 1.15 ===
 
 <head>
- <title>
-   <span tal:condition="python: object_title == portal_title"
-         tal:replace="string:${portal_title}">The title</span>
-   <span tal:condition="python: object_title != portal_title"
-         tal:replace="string:${portal_title}: ${object_title}">The title</span>
- </title>
+ <title tal:content="here/expanded_title"> Title goes here </title>
+
  <!-- Bug in ZPT Causes this to break-metal:block define-slot="base" / --> 
  <link rel="stylesheet" href="zpt_stylesheet.css" type="text/css"
        tal:attributes="href here/zpt_stylesheet/absolute_url">