Back to index

plone3  3.1.7
TitleOrId.py
Go to the documentation of this file.
00001 ## Script (Python) "TitleOrId"
00002 ##parameters=dontCall=0
00003 ##title=Return Title or getId
00004 if dontCall:
00005     title = context.Title
00006     id = context.id
00007 else:
00008     title = context.Title()
00009     id = context.getId()
00010 if title:
00011     return title
00012 else:
00013     return id