How to modified part of the DM UI for instance the footer ?
I would like to override the footer for instance with my xhtml fragment.
I try to create my own theme and deploy it, but doesn't work
<?xml version="1.0"?>
<fragment version="1">
<install>
<unzip from="${bundle.fileName}" to="/" prefix="web">
<include>web/nuxeo.war/**</include>
</unzip>
</install>
<extension target="application#MODULE">
<module>
<java>${bundle.fileName}</java>
</module>
</extension>
</fragment>
The best way is to override the default theme view fragment. For that you just have to name it with the same name. The footer fragment is Nuxeo footer. So if you want to add it, you can do it with Nuxeo Studio with the following steps:
- Resources > Choose File… into the Widget Template section
- Download your xhtml fragment, I assume you name it your_footer.xhtml
- Go to Advanced Settings > XML Contribution > New
- Give a name of your choice
Fill with the following content:
<extension target="org.nuxeo.theme.services.ThemeService" point="views">
<view name="Nuxeo footer" template-engine="jsf-facelets">
<format-type>widget</format-type>
<template>widgets/your_footer.xhtml</template>
</view>
</extension>
That's all I think.
Do it with Nuxeo IDE, you will just be sure that your contribution is deployed after the Nuxeo default one adding the require:
<require>org.nuxeo.theme.nuxeo.default</require>
If you are talking about contributions to “org.nuxeo.theme.services.ThemeService” component, the theme is a contribution as others, you have to declare the file into the “src/main/resources/META-INF/MANIFEST.MF” file into the Nuxeo-Component section.
<pre><code>
Manifest-Version: 1.0
Require-Bundle: org.nuxeo.ecm.webapp.core
Bundle-Name: esup theme custom project
Nuxeo-Component: OSGI-INF/my-theme-config.xml
Bundle-ManifestVersion: 1
Bundle-SymbolicName: nuxeo.my.theme.custom
</pre></code>
"src/main/resources/OSGI-INF/my-theme-config.xml"
Other way would be to add a flavor but this means the structure is not changed.
<pre><code> <extension target="org.nuxeo.theme.services.ThemeService" point="views">
<view name="Custom footer" template-engine="jsf-facelets">
<format-type>widget</format-type>
<template>incl/custom_footer.xhtml</template>
</view>
</code></pre>
Do I need to have to create a customized "document-management.xml" ?