bruno desthuilliers a écrit :
Hi y'all
We'd need to have some portlets that only show up on the 'root' page
('/') of a CPS instance. Whatever combination of portlet
visibility/templeet visibility/theme page we tried so far, we still have
these portlets showing up in the directories views etc - in anything
that is not a section or a workspace in fact.
Any hint ?
(NB : CPS 3.3.6)
TIA
On a recent cps, this is achieved with the portlet guard set to "python:
published == 'index_html'". However,I don't think the guards are available in 3.3.6.
What you could do is use a similar trick with several theme pages and a
.cpsskins_theme python script at CPS root level with the following:
"""
##parameters=REQUEST=None
theme_id = 'my_theme_id'
if REQUEST is None:
REQUEST = context.REQUEST
is_home = REQUEST.get('PUBLISHED').getId() == 'index_html'
if is_home:
return '%s+home' % theme_id
elif not context.portal_membership.isAnonymousUser():
return '%s+authenticated' % theme_id
else:
return '%s+anonymous' % theme_id
"""
Best,
--
Olivier
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel