Expand my Community achievements bar.

SOLVED

Handling of Sling url selector and suffix

Avatar

Level 1

Hi. For example I have a path /en/example.html

At publisher
When there is selector and suffix added to a url and become /en/example.1.html/test.html

The node is resolvable (from recent request) but empty page is shown

 

This happens on the React SPA of WKND Guide.

I also tried on we.retail and seems working correctly, /content/we-retail/us/en.1.html/test.html  can show the content /content/we-retail/us/en.html 

 

How should selector and suffix be handled correctly? Actually would like to handle unknown selector and suffix as 404 content

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
6 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Level 1

These links are talking about the sling resolution on JSP page components. But how about the case of React SPA? Cannot find any article about selector and suffix handling on React SPA

Avatar

Community Advisor

These stand true for HTL and JSPs. The resolution happens as per https://issues.apache.org/jira/browse/SLING-387 . I have to check how React SPA is structured. There won't be any big difference as the React components might be having a one on one relation with AEM components. And AEM components are written in HTL . I will still look into the React SPA and give more input on this.

Avatar

Level 1

Thanks for your reply. I have read this before, but what I need is the way to handle url selector and suffix on React SPA

Avatar

Level 1

Can you share any solution to the above problem , if you have found one.