Skip to content

Increment slugs when accessed indirectly in URI formats #13930

Closed Answered by brandonkelly
yoannisj asked this question in Ideas
Discussion options

You must be logged in to vote

Craft-CMS could observe the slug attribute on the element model (using a property getter/setter?), in order to detect it being used in the dynamic URI and apply its slug incrementation logic even if the {slug} token is not present in the element uriFormat.

We used to do something like that, but changed it due to errors like #2995.

I’ve added a new EVENT_SET_ELEMENT_URI event to the Elements service for Craft 4.6, which can be used to completely override how the URI gets defined (5d5c79c).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@brandonkelly
Comment options

Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
site development 👩‍💻 features related to website/API development
2 participants