Copied to clipboard

Flag this post as spam?

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


  • Per Nergård 2 posts 72 karma points notactivated
    Aug 28, 2018 @ 15:04
    Per Nergård
    0

    UmbracoAPI unable to override property

    Hi

    Im new to Umbraco but have worked with Episerver for many years. I have started a learning project where Im going to port a Episerver site to Umbraco.

    I have installed a clean solution and ModelsbuilderApi and configured everything and the tool generates classes in my ModelsFolder (not App_Data\Models.

    I have document type called StandardPage which have a composition named ContentBase with a property named Header which should be the h1 of the page. If it's not filled in I want to fallback to the content.Name.

    I have followed the info I found creating a partial class and with the same name as my documenttype and used the [ImplementPropertyType("header")] attribute but when running the tool the header property is still generated in the StandardPage.generated.cs class.

    Visual Studio Community and the below packages.

  • Per Nergård 2 posts 72 karma points notactivated
    Aug 28, 2018 @ 15:41
    Per Nergård
    0

    I guess that my first question is something trivial so I have another on the same concept.

    Probably I wan't to use the ContentBase on most of my documenttypes but I don't want to override the property implementation with the same fallback on all those types.

    Or should I create a base documenttype with the property on and the hide it on the templates that shouldn't use it?

  • 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