Hi all,
I have a velocity script with custom css and javascipt based on the login user and i want to apply in all wikis in the farm or in all pages in one wiki.
Is there an easy way to do it without invoke/write it in every page?
tnx
Karolos
Hi all,
I have a velocity script with custom css and javascipt based on the login user and i want to apply in all wikis in the farm or in all pages in one wiki.
Is there an easy way to do it without invoke/write it in every page?
tnx
Karolos
Hello,
You can invoke/write you CSS and javascript with JSX and SSX object:
“Use this extension” → on all xwiki site
About you piece of velocity code it depends what it did and where do you want to lanch it.
Anyway you can paste it in templates/header.vm or use this cleaner way: override your vm file : http://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/Skins/#HD.OverridingtheSkincomponents)
Pascal B
Hello Pascal,
Thank you for your reply. I added them in the header, it is not that clean but unfortunately i do not have the time to get involved with extensions.
Pretty much what i wanted to is to check user rights and hide some elements.
Despite that working correctly in most of the cases, i have trouble with items i want to hide in Navigation.
Assume something like :
#if($hasEdit)
Is there any way to manipulate those, without using extensions such as http://extensions.xwiki.org/xwiki/bin/view/Extension/Document%20Tree%20Macro#HParameters
Or it is required to go like this ?
Thank you
I didn’t use an extension but xwiki feature.
It depends what is your need exactly. On xwiki, elements displayed respect rights access control list. Maybe you must check them if something wrong.
Pascal B