links transformation

Avatar

Avatar
Validate 1
Level 2
sreedobe
Level 2

Likes

4 likes

Total Posts

67 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
Level 2
sreedobe
Level 2

Likes

4 likes

Total Posts

67 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
sreedobe
Level 2

16-07-2020

Hi All,

 

I got following use case and looking for options as well clarity on sling rewrite transformer factory, transformer.

 

mobile app will access AEM site urls with a query parameter "mobile=true" and header, footer needs to be hidden.

 

options:

1. append query param "mobile=true" to all anchor elements hrefs

2. use sling rewrite transformer factory, transformer to transform all anchor urls.

3. store a cookie on first request and if cookie exists or url has query param - hide header, footer

 

Question: If I go in transformer route, does it transform only content urls that exists or does it transform all internal, external urls ?

 

thanks.

Sri

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,328 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

17-07-2020

Hi,

Why don't you use css to hide or javascript to hide/delete header/footer on page load. It will be easy, maintainable and client side.

Answers (0)