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>
0 votes

2 answers

2291 views

ANSWER



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.

0 votes



Do it with Nuxeo IDE, you will just be sure that your contribution is deployed after the Nuxeo default one adding the require:

&lt;require&gt;org.nuxeo.theme.nuxeo.default&lt;/require&gt;
09/26/2012


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.

0 votes



Already declared the contribution in "src/main/resources/META-INF/MANIFEST.MF"

<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"

09/25/2012

Did you name your theme with the same name of Nuxeo one ? and add a require item to the default Nuxeo definition. Or did you set your theme as the default one.

Other way would be to add a flavor but this means the structure is not changed.

09/25/2012

I would like to customize views. For example :

<pre><code> <extension target="org.nuxeo.theme.services.ThemeService" point="views">

<view name="Custom footer" template-engine="jsf-facelets">

  &lt;format-type&gt;widget&lt;/format-type&gt;
  &lt;template&gt;incl/custom_footer.xhtml&lt;/template&gt;
&lt;/view&gt;

</code></pre>

Do I need to have to create a customized "document-management.xml" ?

09/26/2012

I modify your question with the following information…
09/26/2012