Last change
on this file since 1591 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
461 bytes
|
Rev | Line | |
---|
[1] | 1 | ## Script (Python) "qpt_setvisibility" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
| 7 | ##parameters= id, visibility |
---|
| 8 | ##title= |
---|
| 9 | ## |
---|
| 10 | |
---|
| 11 | from Products.CMFCore.utils import getToolByName |
---|
| 12 | obj = getToolByName(context, id, None) |
---|
| 13 | if obj: |
---|
| 14 | if visibility == 'true': visibility = False |
---|
| 15 | else: visibility = True |
---|
| 16 | obj.update(excludeFromNav = visibility) |
---|
| 17 | |
---|
| 18 | return "Visibility set to %s" % visibility |
---|
Note: See
TracBrowser
for help on using the repository browser.