Hi all,
I want to apply the <Next/Previous> macro to all pages in a space without having to include the macro to each and every page manually. Is there a way to do this please?
Thanks
Hmm... that's an interesting task. Maybe it's possible by modfying the theme? Maybe with some JQuery injecting the content you'd like to have. Unfortunately I don't have a usable code snippet for you ATM.
You should be able to do with with the Documentation theme.
Yes I am using the confluence documentation theme. But I don't know how to do this.
Sorry, I should have provided more details.
Ah, Bob explained it in this thread.
Thanks. Only problem is, I don't want this macro added in the header section. I want to add it to the page's content section (the body).
Maybe you should put it in the footer, use it in a (live-)template or inject it with JQuery into the body.
Do you have a sample on how to inject the macro with JQuery into the body please?
Hmm... you can add something like that to the At end of the HEAD section at Look and Feel > Custom HTML in the Admin panel.
<script type="text/javascript"> AJS.toInit(function(){ AJS.$('.wiki-content').append("<p><a href='http://www.google.de'>Hello World!</a></p>"); }); </script>
But you can only add (X)HTML like that. If you want to add a macro to the body, place it to the header section, like Bob mentioned, and than cut and paste it with JQuery to where you want it to live after the page has rendered.
I had the same issue. Here's what I did:
My code is:
<script type="text/javascript"> var panel = jQuery('#prevnext').html().replace(/&nbsp;/g,''); jQuery('#prevnext').empty().append(panel); jQuery('#prevnext').insertBefore('#main-header'); </script>
This assumes you've put a wrapper around the whole of the prev/next button output with the ID of "prevnext".
It looks like you're new here. Sign in or register to get started.