AnsweredAssumed Answered

Jive 7 Dynamic Header/Footer - Global Template?

Question asked by Tim.Julius on Jan 22, 2014
Latest reply on Jan 24, 2014 by Ryan Rutan

I am looking for a way to add custom headers and footers to our Jive instance that change based on the users locale. I am aware of the new Header/Footer feature in the "Customize Your Site" option, but this only appears to allow for static html and css.


In version 4.5 we were able to include a folder structure on the server that housed a unique header/footer freemarker template file for each country and language. Below is a small example of that structure which includes ~30 countries each containing 1 or more languages.


(/var/www/{Country}/{Language}/...Header/Footer files)












We could then pull in the country and language from the locale and include the templates at the top and bottom of /template/decorator/default/template.ftl file to dynamically display on every single page since this was the master template. This also worked up through 6.0 but had to be split between /template/decorator/default/template.ftl and /template/eae/template.ftl. This is not longer the case with 7.0 as they are once again in the same /template/decorator/default/template.ftl, but this template.ftl doesn't appear to be the master template anymore. There is a Soy Template that appears to be used on every page, /soy/template/, but this is very limiting in that I am unable to get a country/language without passing it directly into the template which isn't at the top of the call chain.


My option as I see them are:

  •      I could convert every header/footer pairs into soy templates to render them from the, but doing this would mean I would have to pass Country/Language into everything that renders or perhaps create a custom SoyFunction that could grab that data from the session, but I am unsure of the order if which is executed first, the SoyFunction or the rendering of the soy template.
  •      I could also create a custom SoyFunction to grab the header/footer with the country/language from the session and return it is a string to the soy template in which it was called.


Both of these scenarios above seem over the top for something that was so simple in the past. When searching through the Jive 7 source files, there is a template.ftl that sets up the default templates for every page and the /template/decorator/default/template.ftl is set as that default. Is this just outdated code that is no longer used and pointlessly sitting out there, is this supposed to be the master like in the past but a bug? Or is there another template (please not soy) that I can use?


Any potential help would be appreciated.


Edited to better express the issue at hand.


Message was edited by: Tim Julius