Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

What kind of components to have in content & structure folder

Avatar

Level 2

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.

DuttAbhishek_0-1632297782530.png

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 

DuttAbhishek_1-1632297999962.png

 

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?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

5 Replies

Avatar

Employee

Hi DuttAbhishek

PREVIEW
 
You can find the more information about the project structure and components. 
 
 
I hope this will help.
 
Thanks,
 

Avatar

Level 4

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!

Avatar

Community Advisor

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.

 

 

 

Avatar

Level 2

Yes I was having the same thought , now i know i was thinking right 

Thanks @Ritesh_Mittal  @Rohit-Negi 

Avatar

Correct answer by
Community Advisor

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