What kind of components to have in content & structure folder | Adobe Higher Education
Skip to main content
DuttAbhishek
Level 2
September 22, 2021
Resuelto

What kind of components to have in content & structure folder

  • September 22, 2021
  • 4 respuestas
  • 1975 visualizaciones

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?

 

Este tema ha sido cerrado para respuestas.
Mejor respuesta de Sanjay_Bangar

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

4 respuestas

Lavanya_Pejjayi
Adobe Employee
Adobe Employee
September 22, 2021

Hi DuttAbhishek

PREVIEW
 
You can find the more information about the project structure and components. 
 
 
I hope this will help.
 
Thanks,
 
Rohit-Negi
Level 3
September 22, 2021

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!

Ritesh_Mittal
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 22, 2021

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.

 

 

 

DuttAbhishek
Level 2
September 22, 2021

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

Thanks @ritesh_mittal  @rohit-negi 

Sanjay_Bangar
Community Advisor
Sanjay_BangarCommunity AdvisorRespuesta
Community Advisor
September 23, 2021

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