Source (Text):
if obj is None:
obj=context
target=obj.restrictedTraverse(path)
print target.absolute_url(), ' is the absolute url (virtual host aware)'
print target.getPhysicalPath(), ' is the physical path in ZODB from root'
print target.title_or_id(), ' prints the title or id of the object'
return printed
if obj is None:
obj=context
for elem in path:
if elem:
print 'traversing to ', elem
obj=getattr(obj, elem)
print obj.absolute_url(), ' is the absolute url (virtual host aware)'
print obj.getPhysicalPath(), ' is the physical path in ZODB from root'
print obj.title_or_id(), ' prints the title or id of the object'
return printed
|