Hi Community member,
I am getting started with the AEM developer course, so while going through the developer guide /help book
One question /doubt came across to me.
In the above image, you can see the folder/directories structure. I made two components understructure 1- site-topnav & 2- title and the required functionality working fine and watched a video on youtube of Pankaj Chhatri for the same task but these two components were under the content folder. like this image and did the same I got the desired output
So I wanted to ask
what would be the difference if I continue making them in structure or started making them under content.
What should be the correct way?
Are there any paradigms which we need to follow?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @DuttAbhishek ,
There is no paradigaram .as per the Adobe recommendation that all the components should be categorised properly so everyone can understand what is the use of that component.
Example:page stratucure level components always create the folder structure and then add page stratucure components. Same for page level content components you need to create content folder and add it.
Kr,
Sanjay
Hi @DuttAbhishek ,
There is no such rule that your folder should name only content or Structure(It is only some good practice to have so that it will be consistent), until you are calling the path correctly while using those components.
Thanks!
Hi @DuttAbhishek ,
Let's understand what we really do when we design and create a new page-
1. We split the page in to sections (Header/Footer/Carousel/Image/Image-text, etc).
2. Each split section becomes a functional component.
You can put functional components under 'content' folder since those are to create content on your page.
Now we have the components but we need a page layout where we are going to put those components, isn't it? Which we call as template.
If you want to create component to make the layout (structure) then you can put them inside 'structure' folder.
Also, @Rohit-Negi pointed out correctly you can use other meaningful names as well, it is just way of proper code management and referring.
Yes I was having the same thought , now i know i was thinking right
Thanks @Ritesh_Mittal @Rohit-Negi
Hi @DuttAbhishek ,
There is no paradigaram .as per the Adobe recommendation that all the components should be categorised properly so everyone can understand what is the use of that component.
Example:page stratucure level components always create the folder structure and then add page stratucure components. Same for page level content components you need to create content folder and add it.
Kr,
Sanjay