You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Oliver Lietz (JIRA)" <ji...@apache.org> on 2015/02/08 15:49:35 UTC

[jira] [Commented] (SLING-4330) provide a configuration parameter for paths patterns Sightly should handle

    [ https://issues.apache.org/jira/browse/SLING-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14311343#comment-14311343 ] 

Oliver Lietz commented on SLING-4330:
-------------------------------------

Thanks, [~radu.cotescu]. I've looked into {{SlingScriptAdapterFactory}} and we should handle it there whichever option we choose (changing issue title accordingly).

As discussed on [dev@|http://mail-archives.apache.org/mod_mbox/sling-dev/201501.mbox/%3cCAFkwx-fMUkG8qakdxN=e0EtweXQSor01TVTJNqWX+R9icyh5HA@mail.gmail.com%3e|dev@] we have two practical options to implement selection of script engines in {{SlingScriptAdapterFactory}} other than by extension:

*based on resource settings:*
* can (/needs to) be configured by script/template authors per (ancestor) node (_more freedom for authors_) {noformat}sling:script = [
  „html=thymeleaf“,
  „js=nashorn“
]{noformat}
* needs to read configuration from repository (_traverse resource hierarchy, difficult to cache_)

*based on paths patterns in script engine:*
* needs to be configured by admin (_more restrictive_)
* can result in conflicting patterns
* no need to traverse resource hierarchy to find configuration


> provide a configuration parameter for paths patterns Sightly should handle
> --------------------------------------------------------------------------
>
>                 Key: SLING-4330
>                 URL: https://issues.apache.org/jira/browse/SLING-4330
>             Project: Sling
>          Issue Type: New Feature
>          Components: Scripting
>    Affects Versions: Scripting Sightly Engine 1.0.0
>            Reporter: Oliver Lietz
>
> Running multiple script engines for same script (template) extension should be possible.
> Scripting Thymeleaf already provides that parameter, see {{org.apache.sling.scripting.thymeleaf.SlingTemplateModeHandler#getPatternSpec():org.thymeleaf.PatternSpec}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)