Copied to clipboard

Flag this post as spam?

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


  • billiblu 37 posts 62 karma points
    Sep 22, 2017 @ 08:07
    billiblu
    1

    ModelsBuilder with Vorto and Composition

    Hi,

    in a new project (v 7.7.1), I have defined a DocumentType with name "Seo" used for composition. In this DocumentType I used Vorto to define "metaTitle" property. I used "Seo" to compose "Home" DocumentType and others.

    The MoldelsBuilder generates: - ISeo interface - Seo class that implement ISeo - Home class that implement ISeo and the getter of any ISeo property call a specific method (es. GetMetaTitle()).

    Now, I wold like to implement custom MetaTitle property with string return type (natively ModelsBuilder generates Vorto properties with Our.Umbraco.Vorto.Models.VortoValue return type) and fallback to main language.

    I tried to implement a partial class (in App_Data folder) with my MetaTitle property marked with ImplementPropertyType("metaTitle") attribute. In this case ModelsBuilder not implement MetaTitle property in ISeo interface, Seo and Home classes. I want to use my MetaTitle implementation in every View that use a Model that implement ISeo.

    Are there any solution to indicate to ModelsBuilder to generate MetaTile property in ISeo interface and in Home class with my custom implementation?

    Thanks, Davide

  • Alessandro Calzavara 32 posts 144 karma points c-trib
    Oct 04, 2017 @ 11:03
    Alessandro Calzavara
    0

    Any idea on how to resolve this problem? I'm in the same situation

Please Sign in or register to post replies

Write your reply to:

Draft