I’m moving new project from Wordpress to Craft, which has the hierarchy in URLs.

I’m try to compose URL for this new project:

New category field have an option "Limit the number of selectable categories."

I change to 1, because this category is part of URL structure: blog/{state.first.slug}/{myCategory.last.uri}/{postDate|date("Y")}/{postDate|date("m")}/{slug}

{myCategory.last.uri} can be nested, but, as I limited to 1, and I select any category of level 2 is automatically selected level 1.

I can't able to select only one category keeping levels? (I know it sounds weird) Like: /blog/stateCategory/myCategoryLevel1/myCategoryLevel2/2016/07/slug ?

In the end, I just wanted to limit the “one" inside the hierarchy...

Selecting “myCategoryLevel2” automatically place the “MyCategoryLevel1" in the url. I know this sounds very strange, but this new project, I need to leave identical url structure.

How could I solve this?


  • Not an answer, but maybe categories aren't the right thing to use here for your URL structure? Can you replicate the URL structure you're looking for using a structured section and custom routes? – Brad Bell Jul 8 '16 at 23:54
  • @BradBell See: dl.dropboxusercontent.com/u/43080/H.mov – Luiz Boaretto Jul 9 '16 at 0:48
  • Yeah, I understand the problem (and the video confirms it so thanks for that). The way categories are implemented hierarchically , when you limit a field to X number of selections and a selection has parents, then every one of the parents leading up to X counts towards that limit. Was trying to think if there was a way to do what you're looking for without categories because of this limitation. – Brad Bell Jul 9 '16 at 4:33
  • @BradBell How I can use structured section on entries like news or blogs? – Luiz Boaretto Jul 9 '16 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.