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.