Expand my Community achievements bar.

SOLVED

Custom Link Transformer for non prod environments

Avatar

Level 1

Hi All - I have run into an issue where i have implemented a custom link transformer which needs to be run on non prod environment ( qa, stage, local). I tried adding rewrite config under /apps/<project>/config.<runmode> but my LinkTransformer is not getting called. My linktransformer works fine when added under apps/<project>/config. I need suggesstion on how can i achieve this requirement of running link transformer only on specific environment.

 

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @praja1987 

 

Unfortunately the rewriter definition does not support runmodes. So you need to have your rewriter configured in all environments; and then add some runmode based logic in java implementation, which disables the actual rewriting process on prod.

 

https://sling.apache.org/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.... 

 



Arun Patidar

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @praja1987 

 

Unfortunately the rewriter definition does not support runmodes. So you need to have your rewriter configured in all environments; and then add some runmode based logic in java implementation, which disables the actual rewriting process on prod.

 

https://sling.apache.org/documentation/bundles/output-rewriting-pipelines-org-apache-sling-rewriter.... 

 



Arun Patidar

Avatar

Administrator

@praja1987 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni