Back to index

plone3  3.1.7
expanded_title.py
Go to the documentation of this file.
00001 ## Script (Python) "expanded_title"
00002 ##parameters=
00003 ##title=Build title which includes site title
00004 ##
00005 from Products.CMFCore.utils import getToolByName
00006 from Products.CMFDefault.utils import decode
00007 
00008 utool = getToolByName(script, 'portal_url')
00009 
00010 site_title = utool.getPortalObject().Title()
00011 page_title = context.Title()
00012 
00013 if page_title != site_title:
00014    page_title = site_title + ": " + page_title
00015 
00016 return decode(page_title, script)