Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

limit sling rewriter to some components, strange behaviour of resourceTypes parameter

Avatar

Not applicable

Hi,

I am trying to limit sling rewriter (see http://sling.apache.org/site/output-rewriting-pipelines-orgapacheslingrewriter.html) to some components. There is parameter 'resourceTypes' but it behaves strange. For example, if I set    

resourceTypes="[.../components/navoverview]" then the rewriter works for all components, if I set

resourceTypes="[pathToAnyOtherComponent]" then the rewriter does not work for any component,

if I remove including of navoverview component from the page, then the rewriter works only when I set resourceTypes="[pathToSpecificComponent2]" and it works for all components.

I am using CQ 5.4. Did you worked with the functionality and can help with the issue?

Kind regards!

0 Replies

Avatar

Not applicable

The requirement is to limit the functionality which was implemented by link rewriter to exclude some components. I will be grateful for any help.

Avatar

Level 10

I am looking to see if this was a bug with CQ 5.4. According to the docs:

  • resourceTypes (multi value string) - the resource types this pipeline should be used for (optional)

You should be able to specify a multi value string of components for which the pipeline is applicable. 

Avatar

Employee Advisor

Hi

Why do you want to restrict the link rewriter to only rewrite some components? By the way, I guess, that the resourcetype parameter does only work for the "page components", as IIRC the rewriter is not invoked onto single components, but only to the output as a whole.

Jörg

Avatar

Employee Advisor

If you annotate links with the attribute "x-cq-linkchecker=skip", this link is not checked and not rewritten.

For example:

"<a href="https://forums.adobe.com/content/does/not/exist.html" x-cq-linkchecker="skip">Dead linnk</a>

 

HTH,

Jörg

Avatar

Level 6

Jörg Hoh wrote...

If you annotate links with the attribute "x-cq-linkchecker=skip", this link is not checked and not rewritten.

For example:

"<a href="https://forums.adobe.com/content/does/not/exist.html" x-cq-linkchecker="skip">Dead linnk</a>

 

I second this approach.

/Ove