Selector based page content

Avatar

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile
sivaprasadreddy
Level 3

19-07-2019

Hi Team,

We've a base page from where header/footer components are inherited. We have a requirement where we need to render the page content based on selectors in the page url.

Eg: If the url is localhost:4502/content/poc/product.html, it loads entire content.

If url is localhost:4502/content/poc/product.headless.html --> then it should not load header/footer components.What is the best approach to get header/footer less page content? Do we have any OOTB feature in AEM 6.4?

Please provide your inputs on this.

View Entire Topic

Avatar

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile
sivaprasadreddy
Level 3

19-07-2019

Thanks Ram for the quick reply.

Instead of writing sling models I'm trying to create component sightly htmls like  products.html , products.headless.html, trying to see if that works but unfortunately It didn't work.

The reason why i'm checking without slingmodel is , removing header/footer is one use case. we have multiple use cases where we need to render page output based on selectors like no styles, mobilecontent, desktopcontent etc...

Eg: to remove script/css and just display content we use selector  .nostyles.html