Escaffre Alain wrote:
thank you. It is an amazing hidden funcionnality !
The layout/widget function really increase the autonomy of the end
user, I didn't know about this feature.
-If we create another page, how do we display it in a normal browse ?
there's a default page called 'default', then you can create new pages
inside a same theme. To refer to the page you need to use the
negotiation module.
- you can refer to the page via a URL parameter
(?theme=themename/pagename...)
- or by setting a cookie ('nxthemes.theme')
- or by associating the page to a given view id :
<extension target="org.nuxeo.theme.services.ThemeService"
point="applications">
<application root="/nuxeo">
<view id="/myview.xhtml">
<theme>default/mypage</theme>
</view>
</application>
</extension>
you always specify the theme's name first.
- how do we register a new widget?
--> I saw the nxthemes-fragments-contrib.xml file with the
org.nuxeo.theme.fragments component, but in the generic fragments, I
don't see the reference to the workspace tree,the directory tree, the
logo etc ... how come we have all this list when we browse the menu
addfragment menu in the UI ?
fragments are just the 'model' part in MVC they contain raw data, the
'widgets' are the views that can be adapted to some of the fragments or
other element types (cells, pages, ...), there are some of them declared
in org.nuxeo.themes.jsf and in org.nuxeo.ecm.webapp
so when you add a fragment, in fact you add a (fragment+widget) pair
for instance:
<view name="vertical menu">
<element-type>fragment</element-type>
<format-type>widget</format-type>
<model-type>menu item</model-type>
<class>org.nuxeo.theme.jsf.views.JSFView</class>
<template>nxthemes/jsf/widgets/vertical-menu.xml</template>
</view>
see also https://svn.nuxeo.org/nuxeo/org.nuxeo.theme/trunk/demo for
example configurations.
Best
/JM
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm