How to hide a column in CPS with CPSSkins
2008 juin 6
Since few weeks I went back in CPS to make maintenance on it. I was a CPS core developper, three years ago…
I’m customing a CPS theme with CPSSkins. It could be a very cool product if a documentation exists.
It was so in advanced on web2.0 that only few people really used it outside its main developper and Nuxeo team.
It’s the first article on CPS and not the last one.
a quick recipe to explain how to hide a skin in a part of your site
The goal is to hide the right column when the ‘projects_results’ template is used
- login with site Manager rights
- in the portal box cloick on ‘Edit themes’
- duplicate ‘Fille’ page and named it ‘SansColonne’
- switch to layout mode
- set column number to 1 in the main block
- go in the ZMI on the site root and edit the .cpsskins_theme script with the following code
theme_id = 'mysitetheme' if REQUEST is None: REQUEST = context.REQUEST if not context.portal_membership.isAnonymousUser(): return '%s+Authenticated' % theme_id elif REQUEST.get('PUBLISHED').getId() == 'index_html': return '%s+HomePage' % theme_id elif REQUEST.get('URL').endswith('projects_results'): return '%s+SansColonne' % theme_id else: return '%s+Fille' % theme_id