Answers.Body: <p>The reason why you only see the top level category in your category field and why your URL's only use the top level category is probably because you set the "limit (number of selectable categories)" to 1 in your category field settings.
  That way you can only choose one category but it also <strong>only</strong> selects the top category.</p>
  
  <p>Pretty irritating, I know. I had some issues with it too.</p>
  
  <p>So clear that limit and it should work.
  I don't have a solution to limit the amount of categories selected without that option being checked. I guess you can adopt your templates for multiple categories or write a plugin to do some extra checking when selecting categories.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-12T23:52:13.933Z
Answers.Text: FWIW, we added a "Branch Limit" concept in Craft 3 that addresses that issue: https://github.com/craftcms/cms/issues/1388
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-13T08:21:38.663Z
Answers.Text: Fantastic, this was the problem. I agree, that UI item isn't clear. I just wanted to prevent my users adding multiple categories as this might confuse the URL space, but at least now I can create my desired permalinks etc. Thank you!
Answers.UserDisplayName: Matt Andrews
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-12T18:24:33.997Z
Answers.LastActivityDate: 2017-06-12T18:24:33.997Z
Answers.UserDisplayName: Tom De Smet
Body: <p>I'm new to Craft and exploring whether it's worth my team moving our existing, deeply-structured content site onto Craft CMS.</p>
  
  <p>We have a heavily nested sitemap at the moment with 6 top-level categories and up to 5 nested levels of subcategory, eg:</p>
  
  <pre><code>- Cat 1
      - Sub Cat 1A 
      - Sub Cat 1B 
          - Sub Sub Cat 1Ba 
          - Sub Sub Cat 1Bb 
      - Sub Cat 1C 
  - Cat 2
      - Sub Cat 2A 
      - Sub Cat 2B 
  - Cat 3
      - Sub Cat 3A 
          - Sub Sub Cat 3Aa 
      - Sub Cat 3B
  </code></pre>
  
  <p>I'd like these categories reflected in URL slugs for entries, eg. <code>/cat-1/sub-cat-1-a/</code> and <code>/cat-3/sub-cat-3-a/sub-sub-cat-3-a-a</code> etc.</p>
  
  <p>I made a Category Group called "Navigation" then made a bunch of categories and nested sub-categories. I added a section and made sure it had a Category field in its Entry Types.</p>
  
  <p>What I can't do, though, is get those URLs to work. I've tried following the instructions from Brandon Kelly <a href="https://craftcms.stackexchange.com/questions/353/how-do-i-add-a-subcategory-to-the-url-slug-for-a-channel-entry">here</a> but I only ever get URLs generated with the top-level category slug (eg. <code>/cat-3/{entry.slug}</code>.</p>
  
  <p>Oddly, when I select a category for an entry, no matter how many levels deep I select from, the category shown when I edit the post is always the top-level one, not the one I actually selected. Could this have something to do with it? I've ticked the "Categories in this group have their own URLs" option when editing my <code>navigation</code> Category Group.</p>
  
Tags: <categories><url>
Title: Nested categories in URL slug
ThreadText: # Nested categories in URL slug
  
  (Asked by: username_0 on 2017-06-12)
  
  I'm new to Craft and exploring whether it's worth my team moving our existing, deeply-structured content site onto Craft CMS.
  
  We have a heavily nested sitemap at the moment with 6 top-level categories and up to 5 nested levels of subcategory, eg:
  
  ```
  - Cat 1
      - Sub Cat 1A 
      - Sub Cat 1B 
          - Sub Sub Cat 1Ba 
          - Sub Sub Cat 1Bb 
      - Sub Cat 1C 
  - Cat 2
      - Sub Cat 2A 
      - Sub Cat 2B 
  - Cat 3
      - Sub Cat 3A 
          - Sub Sub Cat 3Aa 
      - Sub Cat 3B
  
  ```
  
  I'd like these categories reflected in URL slugs for entries, eg. `/cat-1/sub-cat-1-a/` and `/cat-3/sub-cat-3-a/sub-sub-cat-3-a-a` etc.
  
  I made a Category Group called "Navigation" then made a bunch of categories and nested sub-categories. I added a section and made sure it had a Category field in its Entry Types.
  
  What I can't do, though, is get those URLs to work. I've tried following the instructions from Brandon Kelly [here](https://craftcms.stackexchange.com/questions/353/how-do-i-add-a-subcategory-to-the-url-slug-for-a-channel-entry) but I only ever get URLs generated with the top-level category slug (eg. `/cat-3/{entry.slug}`.
  
  Oddly, when I select a category for an entry, no matter how many levels deep I select from, the category shown when I edit the post is always the top-level one, not the one I actually selected. Could this have something to do with it? I've ticked the "Categories in this group have their own URLs" option when editing my `navigation` Category Group.
  
  **Tags:** categories, url
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-06-12. Score: 1 | Accepted answer
  
  The reason why you only see the top level category in your category field and why your URL's only use the top level category is probably because you set the "limit (number of selectable categories)" to 1 in your category field settings.
  That way you can only choose one category but it also **only** selects the top category.
  
  Pretty irritating, I know. I had some issues with it too.
  
  So clear that limit and it should work.
  I don't have a solution to limit the amount of categories selected without that option being checked. I guess you can adopt your templates for multiple categories or write a plugin to do some extra checking when selecting categories.
  
  > **Comments:**
  > **username_2**: FWIW, we added a "Branch Limit" concept in Craft 3 that addresses that issue: https://github.com/craftcms/cms/issues/1388  
  > **username_0**: Fantastic, this was the problem. I agree, that UI item isn't clear. I just wanted to prevent my users adding multiple categories as this might confuse the URL space, but at least now I can create my desired permalinks etc. Thank you!  
  
  ---
  
  