Answers.Body: <p>You can create two different <a href="https://craftcms.com/features/entry-types" rel="nofollow noreferrer">Entry Types</a> for your Structure section, and use one Entry Type for parent entries, and a different entry type for child entries. Entry Types have their own field layout, which makes it possible to have different fields for different kinds of entries, within the same Section. Then, it's simply a matter of selecting the right Entry Type when you create/edit your entries.</p>
  
  <p>If that isn't dynamic enough (it isn't possible to assign entry types automatically based on whether an entry has children or not), you could possibly use the <a href="https://github.com/lindseydiloreto/craft-cpcss" rel="nofollow noreferrer">CP CSS plugin</a> (perhaps in combination with the <a href="https://github.com/lindseydiloreto/craft-cpjs" rel="nofollow noreferrer">CP JS plugin</a>) to hide the relevant fields for the parent entries.</p>
  
  <p>I realize that neither of these solutionals are ideal – however, if you only have a single parent (i.e. "Works") for all your portfolio entries, I think a better approach would be to create a separate "Portfolio" Structure section limited to a single level, to hold all your portfolio entries. Set the URL format for this section to <code>"works/{slug}"</code>. Under <code>/templates/works</code> you can add two templates, <code>index.html</code> and <code>_entry.html</code>. The former will render for the URL <code>example.com/works</code> and can be used for your portfolio section's listing page (i.e. it'd replace the current "Works" parent page), and the latter template's path (i.e. <code>works/_entry</code>) should be added to your portfolio section's Entry Template setting.</p>
  
  <p>If you do need some fields for the listing page, you could create a <a href="https://craftcms.com/docs/sections-and-entries#section-types" rel="nofollow noreferrer">Single</a> called "Works" and set its URL Format and Entry Template path to just <code>"works"</code>. A setup like this would circumvent your issue completely (and also avoid the problem with content editors getting your current solution wrong; adding new portfolio entries to the top level).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-20T08:31:01.803Z
Answers.LastActivityDate: 2016-12-20T08:45:25.527Z
Answers.LastEditDate: 2016-12-20T08:45:25.527Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.Body: <p>Or in Addition to Mats answer you could use the <a href="https://github.com/mmikkel/Reasons-Craft" rel="nofollow noreferrer">reasons plugin</a> to hide and show fields based on a lightswitch button. But when you have lots of different fields, different entry types are the way to go.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-20T09:17:07.147Z
Answers.LastActivityDate: 2016-12-20T09:17:07.147Z
Answers.UserDisplayName: KSPR
Body: <p>So, I'm building a portfolio site for a client, and I'd like to know if it's possible to hide fields on a parent entry. Essentially, I've created a structure for portfolio items, and they are all children of the main "Works" page. I've built a set of fields for each portfolio item, but I don't want those fields to show up on the parent entry, as they are unnecessary and therefore distracting. Is there a way I can do this?</p>
  
  <p>Thanks in advance!</p>
  
Tags: <structure><admin>
Title: Hiding Field on Parent Entry
ThreadText: # Hiding Field on Parent Entry
  
  (Asked by: username_0 on 2016-12-19)
  
  So, I'm building a portfolio site for a client, and I'd like to know if it's possible to hide fields on a parent entry. Essentially, I've created a structure for portfolio items, and they are all children of the main "Works" page. I've built a set of fields for each portfolio item, but I don't want those fields to show up on the parent entry, as they are unnecessary and therefore distracting. Is there a way I can do this?
  
  Thanks in advance!
  
  **Tags:** structure, admin
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2016-12-20. Score: 3 | Accepted answer
  
  You can create two different [Entry Types](https://craftcms.com/features/entry-types) for your Structure section, and use one Entry Type for parent entries, and a different entry type for child entries. Entry Types have their own field layout, which makes it possible to have different fields for different kinds of entries, within the same Section. Then, it's simply a matter of selecting the right Entry Type when you create/edit your entries.
  
  If that isn't dynamic enough (it isn't possible to assign entry types automatically based on whether an entry has children or not), you could possibly use the [CP CSS plugin](https://github.com/lindseydiloreto/craft-cpcss) (perhaps in combination with the [CP JS plugin](https://github.com/lindseydiloreto/craft-cpjs)) to hide the relevant fields for the parent entries.
  
  I realize that neither of these solutionals are ideal – however, if you only have a single parent (i.e. "Works") for all your portfolio entries, I think a better approach would be to create a separate "Portfolio" Structure section limited to a single level, to hold all your portfolio entries. Set the URL format for this section to `"works/{slug}"`. Under `/templates/works` you can add two templates, `index.html` and `_entry.html`. The former will render for the URL `example.com/works` and can be used for your portfolio section's listing page (i.e. it'd replace the current "Works" parent page), and the latter template's path (i.e. `works/_entry`) should be added to your portfolio section's Entry Template setting.
  
  If you do need some fields for the listing page, you could create a [Single](https://craftcms.com/docs/sections-and-entries#section-types) called "Works" and set its URL Format and Entry Template path to just `"works"`. A setup like this would circumvent your issue completely (and also avoid the problem with content editors getting your current solution wrong; adding new portfolio entries to the top level).
  
  
  ---
  
  ### Answer by username_2 on 2016-12-20. Score: 2
  
  Or in Addition to username_1 answer you could use the [reasons plugin](https://github.com/mmikkel/Reasons-Craft) to hide and show fields based on a lightswitch button. But when you have lots of different fields, different entry types are the way to go.
  
  
  ---
  
  