Kentico folder structure

Justin L asked on April 21, 2017 11:54

Hello Kentico dev's,

Today i've been playing around with Dancing Goat and trying to setup a new (blank) website within Kentico, but there is one thing that is unclear to me. In the tutorial/documentation it is suggested that the website specific files (stylesheets for instance) are placed within a newly created project folder in the 'CMS' folder inside the Kentico installation when using automation tools (e.g. Sass/Gulp).

But when looking at the folder structure for some of the example Sites, i noticed there are also files placed in a project folder inside the App_Themes folder. Can somebody explain to me, what purpose the App_themes folder has? For instance, why is there an images folder in CMS/CorporateSite/Images and an images folder at CMS/App_Themes/CorporateSite/Images?

Thank you,

Justin

Recent Answers


Ilesh Mistry answered on April 21, 2017 13:48 (last edited on April 21, 2017 13:49)

Hi Justin

It's a place to put theme/site related asessts. You don't need to put your site specific files in there if you do not wish to.

We tend to create a folder within the CMS structure and only include the output files e.g. minified CSS and put the SCSS/Gulp files outside of the CMS folder. So the source files and automation tools are outside, just their output is inside the CMS folder. Hope this makes sense?

1 votesVote for this answer Mark as a Correct answer

Justin L answered on April 21, 2017 14:11 (last edited on April 21, 2017 14:12)

Hi Ilesh,

So if i understand correctly the app_themes is meant to store theme related things?

For example: if you would create a winter theme for the Dancing Goat, you put all the new images in the 'App_Themes/dancing-goat-winter' folder, but if you create a whole new Sites instance, you would create a new projectfolder in the CMS-folder, like 'CMS/dancing-giraffe' if i understand correctly?

Best regards,

Justin

0 votesVote for this answer Mark as a Correct answer

Ilesh Mistry answered on April 21, 2017 14:58

It's a default installation folder. So yeah or you can choose not to use the themes folder if you do not want to.

Anything custom I would create a folder outside of App Themes to make sure you can separate it from future Kentico upgrades and it would be easier to manage them in another folder, but that can be a peference of choice really.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 21, 2017 15:16

Take a look at the documentation on Kentico Export Folder structure. This will help at to see what happens with system folders and other folders when you import/export data from a site.

0 votesVote for this answer Mark as a Correct answer

Justin L answered on April 24, 2017 14:04

Hmm, as i understand right now its just a preference thing. As the documentation Brenden linked shows both folders will be included when exporting sites. I'll keep my files in the root for now, as i find the term 'theme' a little confusing. You can only create site-instances, no seperate 'themes' for a site, right?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 24, 2017 14:28

If you read the documentation, it states folders in green "Folders for custom files, part of the export package. You may need to create these folders manually." So if you have a folder in the /App_Themes directory named the same as your site's code name it will automatically be exported. So while yes, App_Themes were initially meant for different themes on your website in a standard asp.net website, within Kentico, by default if you use the OOTB CSS Stylesheets and your stylesheet's theme tab, it will give you access to all those files within the UI. Whereas if you simply place them in the root of the file system, you'll have no access to them through Kentico at all.

Really the only images and files we put in the /App_Themes directory are font files and any hard design related files, those files we don't want a content editor to be able to access. Otherwise we place all other resources in the media library and /CMSScripts/Custom. Since you can specify where those resources from Gulp and other third party add-ons can go, I'd suggest using the respective places as shown in the export documentation.

1 votesVote for this answer Mark as a Correct answer

Justin L answered on April 25, 2017 11:36

Thank you for your explanation Brenden, makes much more sense to me now.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.