Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter 11 posts 81 karma points
    Feb 12, 2024 @ 20:38
    Peter
    0

    Default values

    Is it possible to set "default values" in fields on an element-type? I have a base element-type, with a number of fields, and I inherit from this with several more specific element-types. On these more specific element-types, I'd like to have some of the field values "pre set" to values specific to their usage.

  • Danny Paul van Iersel 14 posts 122 karma points
    Feb 14, 2024 @ 15:54
    Danny Paul van Iersel
    0

    Hello Peter,

    Not sure if this is what you are looking for, but maybe it helps to point you in some direction.

    Example: https://github.com/dawoe/umbraco-journey-into-the-unknown/blob/master/App_Code/EditorModelEvents.cs

    Or a different example could be: https://docs.umbraco.com/umbraco-cms/reference/notifications/editormodel-notifications

    Kind regards, Danny Paul van Iersel

  • Peter 11 posts 81 karma points
    Feb 14, 2024 @ 15:59
    Peter
    0

    Thanks - I did start looking at the INotificationHandler pattern. I'll give it another shot. I am used to working in another cms called Sitecore, and here it is possible to set up "standard values" on its version of document-types. I thought Umbraco might have something similar built in.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies