There is a solution to call a javascript from one confluence page with the HTML macro.
There is a solution to call a javascript from all the pages of a confluence server thanks to the custom HTML which to configure from confluence administration.
Is there any solution to call a javascript from all the pages of one and only one confluence space?
Just have a condition in the javascript to check the current space?
AJS.params.spaceKey will get you the space key.
@Jobin, true I thought about this solution too. Is there any other way so a space admin can do this without involving a confluence admin?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nothing that I can think of :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could add the code in the page decorator to check the space key using velocity. If it is the space you want then insert the javascript.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The upside of this approach is that the javascript is not even served if it is not the correct space as the velocity code is rendered server side.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interresting approach. Hopefully I have a little experience with velocity and decorator files which can execute a user macro which contains the javascript.
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.