I have a channel where I need each entry's Title include a sequential number, like this: 10003 - Entry Title
Is there a way to prepend a sequential number to the entry title?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityI think you'll need to implement this with the Elements::EVENT_AFTER_SAVE_ELEMENT
event and keep a record of the number.
If it doesn't need to be sequential 1,2,3 you could use a dynamic title and use {{object.sourceId}} which would be the entry id which will always increment