Custom dynamic slug #6248
-
Hello, I would like to dynamically generate the slug using the unixtime instead of the title. Is there any way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You could listen to the EntrySaving event and update the slug in it? |
Beta Was this translation helpful? Give feedback.
-
I was going to suggest putting |
Beta Was this translation helpful? Give feedback.
-
This is now possible in Statamic v3.3.55 using @jasonvarga's approach. When setting up your route pattern, use the new
|
Beta Was this translation helpful? Give feedback.
This is now possible in Statamic v3.3.55 using @jasonvarga's approach. When setting up your route pattern, use the new
date
variable which provides the fullCarbon
instance for the entry date, and pass in whatever format you'd like to Antlers'format
modifier: