On Tue, 2018-10-30 at 20:48 +0100, Oliver Lietz wrote:
> > Wild idea: would it be possible to provide an optional extension
> > point
> > for scripting engines where they could signal that a link is
> > output?
> > Then we would have a central place for handling link rewriting.
> > 
> > I guess for HTL this would not be too hard, and if we cover JSP,
> > HTL
> > and maybe Freemarker/Tyhmeleaf this will be useful enough so that
> > we
> > can recommend using this instead of the more heavy-weight rewriter.
> > 
> > Thoughts?
> 
> Thymeleaf (and Sling Scripting Thymeleaf) already provides an
> extension point 
> for links:
> 
> https://www.thymeleaf.org/apidocs/thymeleaf/3.0.11.RELEASE/org/thymeleaf/linkbuilder/ILinkBuilder.html
> https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#link-urls
> https://www.thymeleaf.org/doc/articles/standardurlsyntax.html
> 
> I'm not sure if it makes sense to fit it in a common (cross-
> language) 
> Scripting API.

There are a lot of 'if's in my argument.

_If_ we decide that the major use case for the rewrite is adjusting
links and _if_ the rewriter is too heavyweight for that scenario and
_if_ it's possible to create a common, optional, API for scripting
engines to expose link rewriting _and_ if it's possible for the most
used scripting engines to implement then we should it ( _if_ anyone has
the time for it ).

My point is that we should not replace a global feature like the
rewriter with one that is scripting-engine dependent.

Thanks,

Robert

Reply via email to