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 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.