On Sep 18, 2006, at 1:26 PM, Joachim Schmitz wrote:

I want to create the pythonscript .cpsskins_theme, which sets the theme for display, by importing the profile.

I tried :

 <script script_id=".cpsskins_theme"
         type="Script (Python)"
         filename="roots/.cpsskins_theme.py"
         />

in roots.xml, the import finishes without error, but the script is not created.

The XMLRootsAdapted treats <object> tags only (see below). It's there to initialize first level folder documents (e.g., sections, workspaces, members)
That being said:
- if you want to use a site wide .cpsskins_theme script, just put it in the skins (the skins are always looked up at the end of acquisition, hence it's still overridable - if you want to put one in a particular root, use the <object> tag (as in most of these xml files) with the meta_type of scripts (Python)

Note also that since a recent improvent by Olivier, the RootXMLAdapter can actually create a whole hierarchy (it's now recursive), so you should be able to put local themes everywhere :-) Unfortunately, it doesn't load properties, so that you have to use scripts, even for static theme pages overrides.

class RootsXMLAdapter(XMLAdapterBase):
    _LOGGER_ID = 'roots'
    name = 'roots'

    (...)

    def _initRoots(self, node):
        site = self.context
        for child in node.childNodes:
            if child.nodeName != 'object':
                continue

    (...)




--
Gruß Joachim



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

---------
Georges Racinet                        Nuxeo SAS
[EMAIL PROTECTED]                http://nuxeo.com
Tel: +33 (0) 1 40 33 71 73


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

Reply via email to