Re: [xwiki-users] Syntax and execution rules for parsed CSS and Javascript objects

2013-08-24 Thread Sergiu Dumitriu
One thing to keep in mind: client (browser) caches don't know about Velocity. This means that if you write different CSS rules depending on some variables, like is guest or authenticated users, then when a user opens the wiki and authenticates, something strange will happen. The browser will

[xwiki-users] Syntax and execution rules for parsed CSS and Javascript objects

2013-08-22 Thread Valdis Vītoliņš
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

Re: [xwiki-users] Syntax and execution rules for parsed CSS and Javascript objects

2013-08-22 Thread Clemens Klein-Robbenhaar
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

Re: [xwiki-users] Syntax and execution rules for parsed CSS and Javascript objects

2013-08-22 Thread Marius Dumitru Florea
On Thu, Aug 22, 2013 at 3:33 PM, Valdis Vītoliņš valdis.vitol...@odo.lv wrote: 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

Re: [xwiki-users] Syntax and execution rules for parsed CSS and Javascript objects

2013-08-22 Thread Valdis Vītoliņš
Thanks Clemens and Marius! I updated http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial#HHowtouseVelocityinparsedcontent with additional notes. Valdis Hi Valdis, it seems in the StyleSheetExtensions / JavaScriptExtensions only the basic variables are defined, like

Re: [xwiki-users] Syntax and execution rules for parsed CSS and Javascript objects

2013-08-22 Thread Marius Dumitru Florea
Thanks. One remark: we're moving away from 'XWiki.XWikiGuest'. The best way to check for guest user is to check for null user reference. See http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki50#HXWikiDocumentauthorsandpublicaccess . So: #if (!$xcontext.userReference) Guest