How do you set a default value on a property?
# help-with-umbraco
c
Even just a simple textstring, I don't see an option in Umbraco 13 for setting a default value for the textbox.
l
You're lookin' for Content Templates, now called Blueprints: https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/document-blueprints The unfortunate bit is the values can't be dynamic
c
If by dynamic you mean 'based on other properties in the page', That's fine, usually it's things like 'default the page size value to '10'' or 'default an article's CTA text to 'Read more' or stuff like that
But, I see it's not automatic - every time you want to create a new page with any sort of default values, you have to explicitly select the content template? Guess that'll just be an education for the customer.
Might just be 'easier' (from an editor's perspective) for us to hook into this and manually force the issue: https://docs.umbraco.com/umbraco-cms/reference/notifications/editormodel-notifications Of course that means the default value's no longer in the CMS, but maybe better than leaving the possibility that the editor does it wrong and then complains.
Still, so much uglier than just having a 'default value' textbox on the property definition. Pity, that.
a
You could probably set it up in a dictionary so that is changeable via the CMS, and on an notification it gets that dictionary and puts it in the propery 🙂
144 Views