[Zope] Zope Page Template id in python script?
altkey
myaltkey at msn.com
Wed Apr 21 02:38:20 EDT 2004
Hi,
I have a breadcrumbs python filesystem script. It's a long script that
constructs dictionaries and places them in a list for a master_template
to display. The dictionaries look like this
relative = context.portal_url.getRelativeContentPath(context)
obj = portal.restrictedTraverse(relative)
.... code for various things ...
ordinaryUrl = portal_url + '/' + join (relative, '/')
ordinaryId = relative[-1]
ordinaryD = { 'id' : ordinaryId
, 'title' : obj.title_or_id()
, 'url' : ordinaryUrl}
In some cases I need to get an id for a zope page template instead of
for 'context'. Can anybody tell me how to do that, or better yet tell me
where the way to do it is documented? I haven't had much luck searching
the source code for something that'll help.
[PS: context for the script never seems to include the page template,
I understand why but I still want to know which page template is in use
when the script is run.]
cheers,
Phil
More information about the Zope
mailing list