JoseLuis de la Rosa Triviño wrote:

Hello,
What I wanted to do is to add an "id" attribute to the html "body" tag. I did 
it by modifiying directly from file system level and it works fine.

I have tried to find the way the renderer switches between the two 
main_template.pt, but I can't see it clearly. May you give some tips about how 
that procedure works?

Thank you very much.



Hi, there are 2 main_template.pt files, one in skins/cpsskins_cps3 and another in skins/cpsskins_cps3_macroless. You can modify them (at your own risk) but not customize them.

The switch occurs in MainContent.py and in the Main content portlet:

   security.declarePublic('render')
   def render(self, template=None, options=None, **kw):
       """Render the main content area by switching to a 'macroless' skin
       inside the request.
       """
       rendered = ''
       if template is None:
           return self.cpsskins_maincontent()
       portal = getToolByName(self, 'portal_url').getPortalObject()
       portal.changeSkin('CPSSkins-macroless')
rendered = template.pt_render(extra_context={'options':options or {}})
       portal.changeSkin('CPSSkins')
       return rendered


/JM
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel

Reply via email to