Hi Valdis, it seems in the StyleSheetExtensions / JavaScriptExtensions only the "basic" variables are defined, like $doc, $request or $xcontext The $isGuest is a "derived" variable; you can find the definition in /templates/xwikivars.vm I am not sure if there is a better way, but at least you can get the code working by copy & paste the definition for the variables you need from the xwikivars.vm to the corresponding objects hope this helps, Clemens
I'm trying to move all velocity macro customizations from files to the database according to http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial
Though I can't find out syntax and execution rules (e.g. order) for parsed entries.
E.g. to implement different styles for anonymous and logged in users for XWiki.StyleSheetExtension parsed code (how Velocity can decide which is macro and whic is CSS id?):
#if($isGuest) #xwikicontent { background-color: blue; } #else #xwikicontent { background-color: red; } #end
Similarly, what should be right way to show alert for XWiki.JavaScriptExtension parsed code:
alert($isGuest);
Thanks! Valdis
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users