Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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

Avatar

Former Community Member

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!

7 Replies

Avatar

Former Community Member

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

Level 1

Well i hope yes rewriting is good for all components

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