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.
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?
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.
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?
is working on a reply...