ClientData folders in scope

Release 1.4 - ...

With the introduction of contextual translation scoping, Smartlets can take on differentiated behavior based on the evaluationscope named parameter. Translation calls using the translation.scope. prefix will automatically be mapped to translations in the given scope.

If this works for the server-side execution of code, it should also work for CSS and Javascript, and it does: just create a 'ClientData' folder in the evaluationscope folder and add your specific CSS and Javascript for the subclassed Smartlet to it.

How it works

Whenever an evaluationscope is passed to a Smartlet, Smartsite will check whether it can find a folder named 'ClientData' subfolder in it. If so, it will then add all CSS and Javascript items not marked as 'Add to Global Include' to the javascript- and cssinclude placeholders.

The includes in the Smartlet folder's ClientData subfolder will be added prior to the more specific evaluationscope-based includes, allowing you to easily redefine CSS and Script-behavior in the current evaluationscope.