cancel
Showing results for 
Search instead for 
Did you mean: 

Theme : add page header

Kahlua_
Champ on-the-rise
Champ on-the-rise

Hello,

I would like to add a header in the document management pages. By header I mean a new DIV positionned above the table containing the "headers" views (Nuxeo DM logo (Galaxy Theme) / Nuxeo header / nuxeo5 includes).
/> The main idea is to append a "banner" at the top of the page and just after having the nxHeader.

Updated : The new div will contain one image : horizontal logo big size (a quarter of the width I would say) with a embedded text (inside the image with aweson fonts, color and everything Gimp or whichever graphics softwrae allows). I'm currently searching if I can override the theme view. Basically I would have prefere somehting like the nxFooter view : an unique block easily extensible.

If possible I would like to update the galaxy / default theme : it's easier for me to maintain if I stay on the "standard" in place of writing a full theme (which can break in the future).

Any ideas ?
/> thanks
/> François

1 ACCEPTED ANSWER

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

There are several options:

  1. override this xhtml template that's common to default themes in the application (as Lise explained) using CSS or JavaScript tricks to make it cover the top of the page (as it'll be rendered in a table in the DOM, between the logo and the "includes" fragment). Default themes include the Document Management, Home, Admin Center, DAM views for instance. This template is quite stable (and has been made easier to override partly or completely over the time).

  2. override the default document management theme layout. This layout does not support merging, so as you said, there can be surprises when upgrading. It should not be too hard to upgrade/migrate, but this change will have to be done on each of the themes. There, the custom banner can be placed above the table in the header, in a new section for instance.

  3. another option is to change the main HTML templates used by the theme system, by contributing to the theme extension points. But this will require changing the theme layouts anyway (although with a smaller diff). This may be deprecated in the future, but should be easy to migrate to a newer model. You can search for "section frame" in document-management.xml, and look it up in nxthemes-jsf-contrib.xml to understand where the table comes from, for instance: section-frame.xml.

At some point, the theme layout system may be made closer to the other layout system (handling forms, listings and summary pages), in which case you may need to follow changes around it when maintaining your customization.

Hope this helps

View answer in original post

10 REPLIES 10

Kahlua_
Champ on-the-rise
Champ on-the-rise

I didn't try because the css hack is OK for the users but I keep your solution in my head (can be useful and will work in my opinion).