Skip to main content
I'm realizing that the question is not very clear and it seems because of my broad use of the word 'slug' and lack of examples. I've updated it to be more concise.
Source Link
cballenar
  • 1.4k
  • 12
  • 23

The website I'm using entry types forworking on has different sections and each section different types of a news websiteentries. I have setup custom URL's for the different sections usingwould like the guides availabletypes of entries to be shown in Craft's main website; however the problemURL. I have is thatfollowed this tutorial to do so.

In a site example.com where we have:

  • A Section called: My Section
  • With Entry Types: Example Entry Type, Another Entry type.

Utilizing the model from the tutorial, we could structure the URL for each entry type, cannot have dashesMy Section as follows:

/my-section/{type}/{slug}

Which would give us URLs like these are "handles", not "slugs".:

  • example.com/my-section/exampleEntryType/new-entry-1
  • example.com/my-section/exampleEntryType/new-entry-2
  • example.com/my-section/anotherEntryType/new-entry-3
  • example.com/my-section/anotherEntryType/new-entry-4

Notice that the entry types are the only part of the URL camelCased. This is very important in order because Entry Types can only be configured to keep allhave a Name, and a Handle; and handles can NOT have dashes. This interferes with keeping URLs consistent. As as the rest of this moment,the site uses dashes instead of spaces

The problem I have some url in camelCase which breaksam trying to solve is: how do we get the system.Entry Types to stay consistent with the rest of the site?

Does anyone have any suggestion on how to deal with this? Is this a problem that should be addressed in Craft? Should I be taking another approach for this?

I had considered using categories but the way the system is setup, entry types seem more appropriate.

I'm using entry types for different sections of a news website. I have setup custom URL's for the different sections using the guides available in Craft's main website; however the problem I have is that the URL for each entry type, cannot have dashes as these are "handles", not "slugs".

This is very important in order to keep all URLs consistent. As of this moment, I have some url in camelCase which breaks the system.

Does anyone have any suggestion on how to deal with this? Is this a problem that should be addressed in Craft? Should I be taking another approach for this?

I had considered using categories but the way the system is setup, entry types seem more appropriate.

The website I'm working on has different sections and each section different types of entries. I would like the types of entries to be shown in the URL. I have followed this tutorial to do so.

In a site example.com where we have:

  • A Section called: My Section
  • With Entry Types: Example Entry Type, Another Entry type.

Utilizing the model from the tutorial, we could structure the URL for My Section as follows:

/my-section/{type}/{slug}

Which would give us URLs like these:

  • example.com/my-section/exampleEntryType/new-entry-1
  • example.com/my-section/exampleEntryType/new-entry-2
  • example.com/my-section/anotherEntryType/new-entry-3
  • example.com/my-section/anotherEntryType/new-entry-4

Notice that the entry types are the only part of the URL camelCased. This is because Entry Types can only be configured to have a Name, and a Handle; and handles can NOT have dashes. This interferes with keeping URLs consistent as the rest of the site uses dashes instead of spaces

The problem I am trying to solve is: how do we get the Entry Types to stay consistent with the rest of the site?

Does anyone have any suggestion on how to deal with this? Is this a problem that should be addressed in Craft? Should I be taking another approach for this?

I had considered using categories but the way the system is setup, entry types seem more appropriate.

Source Link
cballenar
  • 1.4k
  • 12
  • 23

Entry Types Custom Slug

I'm using entry types for different sections of a news website. I have setup custom URL's for the different sections using the guides available in Craft's main website; however the problem I have is that the URL for each entry type, cannot have dashes as these are "handles", not "slugs".

This is very important in order to keep all URLs consistent. As of this moment, I have some url in camelCase which breaks the system.

Does anyone have any suggestion on how to deal with this? Is this a problem that should be addressed in Craft? Should I be taking another approach for this?

I had considered using categories but the way the system is setup, entry types seem more appropriate.