{"id":30,"date":"2015-10-18T14:00:48","date_gmt":"2015-10-18T14:00:48","guid":{"rendered":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/?p=30"},"modified":"2015-10-18T14:06:02","modified_gmt":"2015-10-18T14:06:02","slug":"sitecore-project-architecture-part-1-structure-of-sitecore-tree-2","status":"publish","type":"post","link":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/2015\/10\/18\/sitecore-project-architecture-part-1-structure-of-sitecore-tree-2\/","title":{"rendered":"Sitecore Project Architecture \u2013 Part 1 Structure of Sitecore Tree"},"content":{"rendered":"<body><p><\/p>We will have a look at how to organize a multi site solution in Sitecore. In this part we\u2019ll focus on the Structure in Sitecore, in a later post I will talk about the structure in Visual Studio.\n<p>There are multiple ways of structuring your solution and it all depends on the project requirements , best practices and your preferences. So feel free to drop your approach in the comments and mention why it works for you.<\/p>\n<p>The basic approach is to <strong>have a Global folder and Site specific folders<\/strong>: \u201cSite1\u201d, \u201cSite2\u201d, \u2026<\/p>\n<p>The Global folder will contain templates and items that are not site specific or can be shared by multiple sites.<\/p>\n<p>The Site specific folders will contain templates and items that are specific for that site.<\/p>\n<p>Besides <strong>avoiding chaos tree horror<\/strong> and angry content editors, a good structure will also help you to <strong>apply more fine grained security settings<\/strong> as you can apply different security settings on each folder and therefore restrict access to certain folders for certain roles and users.<\/p>\n<p>There are 4 main areas that can benefit from using the Global and Site specific folders: Content, Layout, Media Library and Templates.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignnone size-full wp-image-21\" src=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure.png?resize=319%2C136\" alt=\"sitecore_structure\" width=\"319\" height=\"136\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure.png?w=319 319w, https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure.png?resize=300%2C128 300w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p><strong>Content<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_content.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignnone size-full wp-image-20\" src=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_content.png?resize=319%2C467\" alt=\"sitecore_structure_content\" width=\"319\" height=\"467\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_content.png?w=319 319w, https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_content.png?resize=205%2C300 205w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p>In the Global folder you can store<\/p>\n<ul>\n<li>item to configure the whole platform<\/li>\n<li>global dictionary (\u201cbuy now\u201d call to action can be used on all the sites)<\/li>\n<li>(datasource) items that can be referenced by all sites: you can have all your office items in the global folder and use them the sites you like.<\/li>\n<\/ul>\n<p>In the Site specific folders you can store<\/p>\n<ul>\n<li>item to configure the specific site<\/li>\n<li>dictionary that only contains site specific translations<\/li>\n<li>(datasource) items specific for this site<\/li>\n<\/ul>\n<p><strong>Layout<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_layout.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignnone size-full wp-image-18\" src=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_layout.png?resize=319%2C384\" alt=\"sitecore_structure_layout\" width=\"319\" height=\"384\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_layout.png?w=319 319w, https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_layout.png?resize=249%2C300 249w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p>It\u2019s a good idea to replicate the same structure in the file system as this will avoid confusion and flexibility to deploy site specific components. So check the path field when you add a layout\/rendering\/sublayout.<\/p>\n<p><strong>Media Library<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_media_library.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignnone size-full wp-image-22\" src=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_media_library.png?resize=319%2C149\" alt=\"sitecore_structure_media_library\" width=\"319\" height=\"149\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_media_library.png?w=319 319w, https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_media_library.png?resize=300%2C140 300w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p><strong>Templates<\/strong><\/p>\n<p><a href=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_templates.png\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"alignnone size-full wp-image-19\" src=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_templates.png?resize=319%2C360\" alt=\"sitecore_structure_templates\" width=\"319\" height=\"360\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_templates.png?w=319 319w, https:\/\/i0.wp.com\/gingeraroundtheworld.com\/SyntacticSugar\/wp-content\/uploads\/2015\/10\/sitecore_structure_templates.png?resize=266%2C300 266w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p>The \u201cYourClientName\u201d folder is useful to differentiate templates that you created and templates folders that are automatically created when you install certain Sitecore modules<\/p>\n<p>In the Global folder you can create templates (often for datasource items) used by components that can be used in all the sites.<\/p>\n<p>In the Global\/Fields folder you can create basic building blocks: each templates has just a few fields. A lot of templates need \u201cdescription\u201d field, so instead of adding a description field to each templates you can use Sitecore\u2019s inheritance model. Even if your building block only contains 1 field, it means that the field will be consistently the same everywhere you inherit it. This is useful to avoid situations where you would name your field \u201csummary\u201d in one template and \u201cshort description\u201d in another template and confuse content editors.<br>\nIt will also simplify your (possibly code generated) models.<\/p>\n<p>There is a nice best practices webinar that also talks about Sitecore structure:<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/5gxTfxCMVss\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Feel free to drop your approach, comments and feedback.<\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>We will have a look at how to organize a multi site solution in Sitecore. In this part we\u2019ll focus on the Structure in Sitecore, in a later post I will talk about the structure in Visual Studio. There are multiple ways of structuring your solution and it all depends on the project requirements , &hellip; <a href=\"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/2015\/10\/18\/sitecore-project-architecture-part-1-structure-of-sitecore-tree-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Sitecore Project Architecture \u2013 Part 1 Structure of Sitecore Tree<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,3,4],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-architecture","category-cms","category-sitecore"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":2,"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":36,"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/posts\/30\/revisions\/36"}],"wp:attachment":[{"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gingeraroundtheworld.com\/SyntacticSugar\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}