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

<p>I’m try to compose URL for this new project:</p>

<p>New category field have an option "Limit the number of selectable categories."</p>

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

<p>{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.</p>

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

<p>In the end, I just wanted to limit the “one" inside the hierarchy... </p>

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

<p>How could I solve this?</p>

<p>Thanks!</p>

CC BY-SA 3.0
2016-07-08T23:54:16.580Z
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
CC BY-SA 3.0
2016-07-09T00:48:10.720Z
@BradBell See: https://dl.dropboxusercontent.com/u/43080/H.mov
Luiz Boaretto
CC BY-SA 3.0
2016-07-09T04:33:29.160Z
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
CC BY-SA 3.0
2016-07-09T15:23:46.900Z
@BradBell How I can use structured section on entries like news or blogs?
Luiz Boaretto
<categories><entry><url>
Compose entry URL with hierarchy
# Compose entry URL with hierarchy

(Asked by: username_0 on 2016-07-07)

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?

Thanks!

**Tags:** categories, entry, url
> **Comments:**
> **username_1**: 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?  
> **username_0**: @BradBell See: https://dl.dropboxusercontent.com/u/43080/H.mov  
> **username_1**: 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.  
> **username_0**: @BradBell How I can use structured section on entries like news or blogs?  

---

## 0 answers

