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
Ah, Bob explained it in this thread.
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".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have a sample on how to inject the macro with JQuery into the body please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe you should put it in the footer, use it in a (live-)template or inject it with JQuery into the body.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I should have provided more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should be able to do with with the Documentation theme.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.