1

Is it possible to have a channel where you do not have to define a URL name for every entry. I want to have a channel for events which are only shown in a list (no extra page for each event) so it would be quite annoying to always come up with a unique id for the URL field.

Thanks in advance!

1

Automatic creation of unique URL titles was a built-in feature of EE in v2. Apparently it was removed with v3. You can see some discussion of the issue on this bug report https://expressionengine.com/support/bugs/21902/adding-a-new-entry-with-the-same-title-as-an-existing-one-does-not-auto-gen

Looks like there are no plans to bring this functionality back in later versions of EE. I'm surprised. It seemed like a smart feature and good for users.

That discussion does reference a plugin called Smart URL Title which can be used as a patch for this. https://github.com/willowlight/Willow-Smart-URL-Title

This addon will check for an existing URL Title in the same channel and automatically append it to avoid errors when saving the entry.

Example, if an existing URL title willow-smart-url-title exists, the addon will change it to willow-smart-url-title-2. It will also increment the number (up to 10) if future entries share the same URL title.

Additionally a message will be displayed under the URL Title field to let the editor know that a duplicate URL was found, and the URL Title was modified to avoid errors.

| improve this answer | |
0

When you create a title for a new entry, the URL title is auto-generated as you can plainly see. The URL title will always be required for every entry.

Just because each entry needs to have a unique URL title doesn't mean it needs to be used in anyway; it's just a unique identifier. Unfortunately it has to be unique and you won't be able to save a new entry until it is.

The only solution I could think of for this is creating a helper add-on to warn you before you try to save your entry that the URL title isn't unique, or automatically add an index counter to the end (so if you enter a title of "Test Entry", a URL title of "test-entry" is generated, but the add-on finds that title already exists, so it tries "test-entry-1", and if that exists, tries "test-entry-2", etc..).

It might be a fun side project to build, but I'm not sure it's worth it instead of just manually adding a "-1" (or "-2", "-3", etc..) to your URL titles if the title is already taken.

| improve this answer | |
  • EE will enforce unique URLs. So even if you title every single entry the same, you'll still be good. Last time I checked it appends a number to the entry just as you described. – Alex Kendrick Feb 27 '19 at 23:50
  • I checked an EE5 and an EE4 installation and tested; it doesn't automatically append a number anymore. It returns to the form and casts an error class and verbiage on the URL title field that it has to be unique. CraftCMS automatically does this though. I tested an EE2 installation and it does just append a number. Dunno why but they dropped that functionality, and I can't find a setting in EE4 or EE5 for this. Didn't check the docs for a config var though. – jrothafer Feb 28 '19 at 5:27
  • That's too bad. This used to be built into EE core in v2, as you said. I looked into this a bit more and added an answer here with more info. – Alex Kendrick Feb 28 '19 at 14:31

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.