Hello Justin,
Or, you could do:
class SiteTitle(BrowserPage):
def __call__(self):
site = hooks.getSite()
return site.title
<page
name="siteTitle"
for="*"
class=".SiteTitle"
permission="zope.Public"
/>
<head>
<title tal:content="context/@@siteTitle">sitetitle</title>
</head>
Tuesday, August 3, 2010, 7:11:48 AM, you wrote:
JR> On Mon, Aug 2, 2010 at 12:32 AM, Adam GROSZER <[email protected]> wrote:
>> Hello Justin,
>>
>> from zope.component import hooks
>> site = hooks.getSite()
>>
JR> Sweet! Thanks Adam..
>> Beware, this will get set during traversal and is a thread_local.
>>
JR> Good to know. I just basically want to grab the site's name / title
JR> and use it in some places of the ui. :)
JR> Thanks, again!
JR> _______________________________________________
JR> bluebream mailing list
JR> [email protected]
JR> https://mail.zope.org/mailman/listinfo/bluebream
--
Best regards,
Adam GROSZER mailto:[email protected]
--
Quote of the day:
If Microsoft built cars... you'd have to push the "Start" button to shut off
the engine.
_______________________________________________
bluebream mailing list
[email protected]
https://mail.zope.org/mailman/listinfo/bluebream