Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How is the HTML that is generated by components represented in the repository?

Avatar

Avatar
Validate 1
Level 2
kendalls5216292
Level 2

Likes

0 likes

Total Posts

23 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
kendalls5216292
Level 2

Likes

0 likes

Total Posts

23 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile
kendalls5216292
Level 2

11-06-2020

My knowledge of Sling and AEM is improving, but I'm still confused about a lot.

 

I have components and templates that produce HTML using JSP. The last part of the path looks like this in CRX/DE:

 

something/jcr:content/contentnode

 

contentnode has sling:resourceType=foundation/components/parsys

jcr:content has sling:resourceType=/apps/myapp/components/siteoutput/default/topicpage

something has jcr:primaryType=cq:Page

 

If I click on something, html is loaded into the browser with the last part of the path being something.html

 

So is the html only created when someone loads the node something into a web browser, or is it stored somewhere? I mean aside from any web server/web app caching.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

180 likes

Total Posts

156 posts

Correct Reply

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

Avatar
Affirm 50
MVP
Vaibhavi
MVP

Likes

180 likes

Total Posts

156 posts

Correct Reply

50 solutions
Top badges earned
Affirm 50
Validate 1
Ignite 1
Give Back 5
Give Back 3
View profile
Vaibhavi
MVP

11-06-2020

Hi @kendalls5216292 , 

Any template or components renders based on sling resolution. 

Templates:

Any template has its page rendering component. Basically when you create the page by selecting the template, page rendering component will load the resources defined ie html css js etc 

Component:

When the component is added on the page, again similar sling resolution happens and content will be loaded

 

In short to make you understand in your scenario sling resolution steps added below. 

  • Once you load the page on browser path will be taken from /content/xyz/xyz(leaving the extension) 
  • Once you navigate to the above path in crx you can find the sling:resource type where path will be pointed to page rendering component that is,/apps/components /<component-name>
  • Resources are loaded from the component (you can see sling resolution document to understand which JSP will be selected) 

Also, to answer your another question, it is not only the html format will be rendered always. AEM supports other rendering formate as well ex JSON

Adobe documentation will explain this in detail. 

Answers (2)

Answers (2)

Avatar

Avatar
Boost 5
Employee
akashk22786878
Employee

Likes

30 likes

Total Posts

25 posts

Correct Reply

4 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
Employee
akashk22786878
Employee

Likes

30 likes

Total Posts

25 posts

Correct Reply

4 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
akashk22786878
Employee

11-06-2020

Hi kendalls5216292 ,

 

Every page i.e a node of type cq:page in AEM is associated with a template that defines the page component used to render the page. This page component would contain the default HTML code which would be rendered when the page is called. You can refer to https://helpx.adobe.com/in/experience-manager/6-3/sites/developing/using/the-basics.html for understanding the basic sling script resolution.

Avatar

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

440 likes

Total Posts

1,016 posts

Correct Reply

115 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile

Avatar
Establish
MVP
Veena_Vikram
MVP

Likes

440 likes

Total Posts

1,016 posts

Correct Reply

115 solutions
Top badges earned
Establish
Coach
Contributor 2
Seeker
Ignite 5
View profile
Veena_Vikram
MVP

12-06-2020

@kendalls5216292 I get your issue here. Totally understand where you are struggling. Since I understand from your post that you are a beginner in AEM , I would first recommend you to go through the Basic AEM architecture. The answer to your entire question resides with the basic architecture of AEM. I searched for the official docs on this but couldn't find it in google search so sharing this instead. https://www.zarantech.com/blog/aem-architecture-explained/ it's the same.

 

Now coming back to your question, the issue you are struggling here to understand is called Sling Resolution or Sling Resource Resolution. I had recently tried to explain the same with some example in my Linkedin

I would recommend you to read this and let me know any more question on this and we will be happy to help. 

 

Happy development 😉

Veena ✌