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

Radu Cotescu commented on SLING-4330:
-------------------------------------

The {{ResourceResolution}} class is responsible for identifying components or 
use objects relative to a base resource or to a request.

If we'd like scripting engines to process templates based on allowed paths I 
think that this should happen at a higher level. AFAIK a scripting engine 
registers itself for an extension, but that's about it. The behaviour that 
determines which script engine will provide the rendering for a resource is 
implemented by the {{SlingServletResolver}}, which adapts the component's 
resource to a {{ScriptEngine}}.

The {{AdapterFactory}} that performs the adaptation is implemented by 
{{SlingScriptAdapterFactory}}, which picks the scripting engine based solely on 
extension. If we'd change the {{ScriptEngineFactories}} to also provide the 
path patterns for which they register and we'd expose the patterns as a 
configurable OSGi property I think we'd reach the goal of having scripting 
engines rendering templates also based on paths.

Let's have this discussion on sling-dev.

> 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)

Reply via email to