Nuxeo/Blogs

Product & Development / All about the Nuxeo Platform, from strategy to feature highlights to dev tricks

[Q&A Friday] Is it possible to change Nuxeo Platform footer links with Studio?

without comments

Nuxeo 5.5+Studio : Page Footer branding

Nuxeo 5.5 + Studio: Page footer customization

Today we have a question from apx25, who asks if he can change Nuxeo Platform footer links using only Nuxeo Studio.

Unfortunately, as explained by Anahide, the answer is no, you can’t. You have to override the XHTML template displaying those links. Now the good thing about Nuxeo’s architecture is that you don’t have to modify its source code and rebuild everything. It’s a lot simpler than that.

Create a new bundle with Nuxeo IDE

The first step is to set up your work environment. I strongly suggest you go through the Nuxeo IDE documentation to get strated. You’ll have a configured Eclipse and a Nuxeo server running in no time.

The next step is for you to create a new Nuxeo project. Once you’re done, you’ll have an empty Nuxeo project. Then you need to create the XHTML file you want to override. In usual Nuxeo bundles the XHTML files are located under resources/web/nuxeo.war. So if you want to modify the footer links, you need to create the file nuxeo_footer_template.xhtml under resources/web/nuxeo.war/incl/.

Choose a WizardMy Project Wizard
Once your file is created and modified to suit your needs, you have to deploy it. In Nuxeo, the WAR file is generated each time you start the server by looking into each jar in nxserver/bundles and nxserver/plugins. More precisely, this happens because you set an install XML tag in the deployment-fragment.xml file. Content syntax of the tag is simply Ant. This file should be created under resources/OSGI-INF. Here’s the content of a simple deployment-fragment.xml:
<?xml version="1.0"?>
<fragment version="1">

  <install>
    <!--  unzip the content of the resources/web folder in nxserver -->
    <unzip from="${bundle.fileName}" to="/" prefix="web">
      <include>web/nuxeo.war/**</include>
    </unzip>

  </install>

</fragment>

Now you know how to override the XHTML template in Nuxeo. Just remember that doing so is risky for maintenance. The original template could be heavily changed or even renamed or removed in  future versions of Nuxeo. If for any reason you find yourself with no other alternatives, come to answers.nuxeo.com and explain your issue. We’ll try to figure something out :D

See ya on Monday!

March 30th, 2012 at 1:39 pm

About Laurent Doguin

Laurent works as developer and community liaison at Nuxeo, a software company providing a full Enterprise Content Management Platform, open source, for any kind of content-driven application.