-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Dynamic Variables to be appended to URL titles, to ensure URL Titles are unique. #2645
Comments
+1 for this, but also make sure that any settings transpose over to the Structure URLs too, so listings in structure can benefit from those same unique slugs. |
+1 |
1 similar comment
+1 |
The referenced PR #2677 should solve the problem for people who don't care much about the exact syntax of URL title. It does not do exactly what is being requested here, as it only presents a toggle to enforce unique URL titles, without possibility to choose the format, so keeping this issue open for now - but we believe this will cover what most people need. |
Not personally fussed by the exact syntax of the URL Title, just needs to be forced to be unique by the CP. |
Is your feature request related to a problem? Please describe.
When creating a new entry, if the Title, and therefore URL title already exists, it asks the user to amend the URL title to make it unique, something we shouldn't be expecting non-techy clients (who don't understand "websafe") to be doing.
For some projects this is annoying, eg where multiple events with the same title (eg "Aberdeen Meet-Up") exists on a weekly basis. The {exp:channel:forms} allows us to dynamically generate a URL title using othe values, eg dynamic_title="{title}-{custom_field}-{current_time}" - it would be really helpful if the CP would allow us to do this too.
Describe the solution you'd like
Allow, within the channel settings, the option to use variables such as {entry_id}, {current_time}, or any {custom_field} to be added to the start / end of the URL title, as a way to ensure URL Titles are always unique, without requiring clients to go amending these.
Describe alternatives you've considered
A checkbox that appends a random string to the URL title, perhaps if it already exists, or othewise by default.
Teachability, Documentation, Adoption, Migration Strategy
In the directions for Edit Channel > Settings > Defaults, add an additional field for URL title suffix, with directions to cover:
URL title suffix assigned to all new entries in this channel. Dynamic variables
{current_time}
or{entry_id}
are also available, eg-{current_time format="%d-%Y"}
I can't write PHP I'm afraid, but more than happy to test it.
The text was updated successfully, but these errors were encountered: