Answers.Body: <p>Yes, I think what you're saying is completely correct.</p>
  
  <p>Settings > Sections > Homepage > Edit entry type</p>
  
  <p>The "layout" here is only meant for the back end. This is just how you assign fields you want entries in that section to use and what it will look like for admins to create and edit entries.</p>
  
  <p>Settings > Sections > Homepage</p>
  
  <p>Will show you what template is being called when there's a match for that URI.</p>
  
  <p>In the file system, your template files will be located in either <code>/craft/templates</code> if you're using Craft 2, or just <code>templates</code> if your using Craft 3. It's probably worth noting that these directories are usually above the web root.</p>
  
  <p>For example:</p>
  
  <pre><code>.
  ├── craft
  ├── templates
  └── web &lt;-- web root
      └── index.php
  </code></pre>
  
  <p>If you're afraid of breaking things on a live site, you could create a duplicate of the site and run it locally or on another server. That's a great way to sandbox changes and play with things to see what effect they have.</p>
  
  <p>Another great way to learn how Craft works is to try out the <a href="https://github.com/craftcms/demo" rel="nofollow noreferrer">"Happy Lager" demo site</a>. It's a pretty simple Craft site and well organized. I've see live production sites that are incredibly complex or over-engineered. I can't imagine trying to learn Craft with one of those as my only example.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-10T16:17:39.020Z
Answers.Text: Awesome...connecting all the pieces is the challenge!  I do have a "safe" site to edit and break so that will be my next task....thanks so much.
Answers.UserDisplayName: Pete Helgren
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-10T20:53:49.323Z
Answers.Text: Glad to hear. If this answer helped you out, feel free to up vote it or accept it by clicking the green checkmark.
Answers.UserDisplayName: Alex Roper
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-10T08:25:48.793Z
Answers.LastActivityDate: 2018-10-10T20:53:46.347Z
Answers.LastEditDate: 2018-10-10T20:53:46.347Z
Answers.UserDisplayName: Alex Roper
Body: <p>I am new to Craft and I am basically inheriting a site that I now need to maintain.  I am a developer, not really a web designer, and my current task is to change the layout on the homepage.  Something simple, I thought.</p>
  
  <p>What I am trying to wrap my head around is the connection between the web content that is defined in Craft and the twig files I see in templates.</p>
  
  <p>So in website content when I look at the Homepage, I see text boxes and other content containers that appear to be where an end user could maintain "changeable" stuff.  Going further, I can see in Settings the "Section" for homepage where there is name, handle, template, etc as well as option to "Edit Entry type" where it seems that you don't layout the page as much as define what parts of the page will be editable content.  Is that correct?</p>
  
  <p>So "Define Your Field Layout" is a bit of a misnomer?  You aren't designing the layout as much as defining what content your "layout" will contain?  So that leaves me with:  Where do I actually lay out the page?  Where is stuff positioned "just so"?  I don't see a WYSIWYG tool for that.  So, can I assume that the "Entry Template" listed in the section is the twig for the actual layout of the content?  In this case, there is 'index' as a value there so I should look for an index.twig that will contain the html and css for the page? </p>
  
  <p>I am just trying to piece together the components. The last piece, if my assumptions above are correct, is that the index.twig, when I find it, will have twig markup that points back to the fields in the "layout" I saw in the section definition?  </p>
  
  <p>There just seems to be many moving parts and my past experience with CMS's is if you fail to understand how stuff hangs together then you tend to do too much work to make it work, rather than following convention.  As a developer, my first instinct is to write code, which can be a bad approach with a CMS...</p>
  
  <p>Just want to confirm if my understanding of the basic connections is correct..more questions after I start breaking stuff...</p>
  
  <p>Thanks</p>
  
Tags: <templating>
Title: Connection between twig template and website content
ThreadText: # Connection between twig template and website content
  
  (Asked by: username_0 on 2018-10-09)
  
  I am new to Craft and I am basically inheriting a site that I now need to maintain. I am a developer, not really a web designer, and my current task is to change the layout on the homepage. Something simple, I thought.
  
  What I am trying to wrap my head around is the connection between the web content that is defined in Craft and the twig files I see in templates.
  
  So in website content when I look at the Homepage, I see text boxes and other content containers that appear to be where an end user could maintain "changeable" stuff. Going further, I can see in Settings the "Section" for homepage where there is name, handle, template, etc as well as option to "Edit Entry type" where it seems that you don't layout the page as much as define what parts of the page will be editable content. Is that correct?
  
  So "Define Your Field Layout" is a bit of a misnomer? You aren't designing the layout as much as defining what content your "layout" will contain? So that leaves me with: Where do I actually lay out the page? Where is stuff positioned "just so"? I don't see a WYSIWYG tool for that. So, can I assume that the "Entry Template" listed in the section is the twig for the actual layout of the content? In this case, there is 'index' as a value there so I should look for an index.twig that will contain the html and css for the page?
  
  I am just trying to piece together the components. The last piece, if my assumptions above are correct, is that the index.twig, when I find it, will have twig markup that points back to the fields in the "layout" I saw in the section definition?
  
  There just seems to be many moving parts and my past experience with CMS's is if you fail to understand how stuff hangs together then you tend to do too much work to make it work, rather than following convention. As a developer, my first instinct is to write code, which can be a bad approach with a CMS...
  
  Just want to confirm if my understanding of the basic connections is correct..more questions after I start breaking stuff...
  
  Thanks
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-10-10. Score: 1 | Accepted answer
  
  Yes, I think what you're saying is completely correct.
  
  Settings > Sections > Homepage > Edit entry type
  
  The "layout" here is only meant for the back end. This is just how you assign fields you want entries in that section to use and what it will look like for admins to create and edit entries.
  
  Settings > Sections > Homepage
  
  Will show you what template is being called when there's a match for that URI.
  
  In the file system, your template files will be located in either `/craft/templates` if you're using Craft 2, or just `templates` if your using Craft 3. It's probably worth noting that these directories are usually above the web root.
  
  For example:
  
  ```
  .
  ├── craft
  ├── templates
  └── web <-- web root
      └── index.php
  
  ```
  
  If you're afraid of breaking things on a live site, you could create a duplicate of the site and run it locally or on another server. That's a great way to sandbox changes and play with things to see what effect they have.
  
  Another great way to learn how Craft works is to try out the ["Happy Lager" demo site](https://github.com/craftcms/demo). It's a pretty simple Craft site and well organized. I've see live production sites that are incredibly complex or over-engineered. I can't imagine trying to learn Craft with one of those as my only example.
  
  > **Comments:**
  > **username_0**: Awesome...connecting all the pieces is the challenge!  I do have a "safe" site to edit and break so that will be my next task....thanks so much.  
  > **username_1**: Glad to hear. If this answer helped you out, feel free to up vote it or accept it by clicking the green checkmark.  
  
  ---
  
  