i like the idea! what about a context aware configuration?

Le ven. 11 sept. 2020 à 01:09, Georg Henzler <ghenz...@apache.org> a écrit :

> Hi all,
>
> as briefly mentioned in the thread about the resource
> mapping SPI [1], it would be really useful if HTL
> could auto-map URIs (regardless of the SPI)
> - that way many projects that use the rewriting
> pipeline [2] today for that purpose could simplify
> their setup (and make it more performant). Now the
> question is how to do this best, the following
> options come to my mind:
>
> 1. Per URI as mentioned in template:
>
>    <a href="${'/content/path/to/page.html' @ mapUri}"/>
>
> 2. Turned on/off with a wrapper element
>
>    <sly data-sly-map-uris="true">
>      <a href="/content/path/to/page1.html"/>
>      <a href="/content/path/to/page2.html"/>
>      ...
>    </sly>
>
> 3. Per global OSGi configuration
>
> Now 1. is not very convenient (and would produce a
> lot of noise in the template), 2. is probably the
> most flexible and should make it fairly easy to run
> the rewriting pipeline side by side with the new
> approach at certain content paths, 3. is the easiest
> to implement but it should at least allow to configure
> a regex of content paths where auto-mapping applies
> (to ensure the approaches can run side by side)
>
> Are there other (better) ideas? Or more generally,
> are there any concerns to move into this direction?
>
> -Georg
>
> [1] https://www.mail-archive.com/dev@sling.apache.org/msg97820.html
> [2]
>
> https://sling.apache.org/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.html
>

Reply via email to