Customise Confluence layout

Hi, I'm using Confluence 4.2.11.

I spent some days for reading the documentation for customising the confluence layout, but there was no satisfaction for the solutions I found.

First I try to use the default confluence theme. It's very nice to customise with the the decorators and velocity. But the sidebar integration for this theme has two big disadvantages: The navigation panel breaks the layout of the wiki content and the wiki content cannot be scrolled independent of the navigation sidebar. The sidebar from the documentation theme is perfect! So I try to integrate it into the default theme. I extract the doctheme-4.2.11.jar and copy the main.vm and page.vm and paste it as custom layout to the default theme. I add in the main.vm this line for fetching the CSS and JavaScript files:

<tt>#requireResourcesForContext("com.atlassian.confluence.plugins.doctheme")</tt>

But when I refresh the page, the sidebar was not working/visible, the CSS and JS files were not be included into the html page. But in the html source I found the complete sidebar in the splitter-sidebar node.

So this seems not to work and I try it the revert way: I switch to the documentation theme. But there it's not possible to customise the velocity template / decorator. So I extract the doctheme-4.2.11.jar and put the main.vm and page.vm into the WEB-INF/classes/ directory and modify the main.vm files. That works!

But now the next problem: what is with the other decorators, for example global.vm, space.vm, etc. How can I customise them?
And how can I make custom modifications for each space with the docoumentation theme?

2 answers

1 accepted

Have you seen Zen Foundation or Refined Wiki ? (see marketplace.atlassian.com)

Maybe those out of box themes will save you some headaches and meet your needs too - they are pretty mature in their product development, and well supported themes.

Just an idea.

We have installed Refined Wiki, its nice because you can now creaet categories and subcategories and can put spaces into them. And it's also customizable.

I can answer the last question. If you use a theme such as "Documentation", then you are severely limited as to what customizations you can make to the decorators. This is why we chose our own path rather than use a custom theme.

and what was your own path ? how do you realize it?

We examined a few themes (Doc, Zen, and one or two others) and realized that the site we wanted to build (a "developer center") could not be done with a theme. So, our path consists of:

- Use jQuery for tweaking some UI elements

- Custom CSS for just about everything

- Custom main, page, and other decorators for each space

- Custom VMs for many site features

- Tons of macros

It's been a bit of a slog, but the site looks and feels fantastic and we couldn't be happier with the flexibility we now have because it's all "home-rolled".

Ah okay, but you don't use a real theme, I mean you don't create a real plugin. Because when you want to create a custom theme you have to create a confluence plugin.

Do you integrate a sidebar like in the documentaion theme, when yes, can you give me some hints or snippest, that I can use?

We use a statically-wide sidebar that houses the pagetree macro. Looks to me like the doc theme uses the jQuery splitter component (http://methvin.com/splitter/vsplitter.html).

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,925 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you