Copied to clipboard

Flag this post as spam?

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


  • Gilles 27 posts 109 karma points
    May 08, 2019 @ 11:49
    Gilles
    0

    ModelsBuilder - Different namespace for different document types

    Hi there,

    I'm using Umbraco v8 with ModelsBuilder. Everything is working fine up until now.

    Now, I have been tasked to add a second site to the Umbraco installation. Currently, it was a single website installation.

    This is basically not a problem. I figured out how to set it up. My problem is with ModelsBuilder.

    Consider this: Site A and Site B both should have an "Article" Document Type. Both "Article"s will have different properties, thus I don't want them to be shared between the Sites A and B.

    What I could do, is have 2 Document Types: SiteAArticle and SiteBArticle. Modelsbuilder will then generate 2 distinct classes in the same namespace like so:

    MyNameSpace.SiteAArticle
    MyNameSpace.SiteBArticle
    

    However, I would like to avoid that. I would rather have the document types in distinct namespaces, like so:

    MyNameSpace.SiteA.Article
    MyNameSpace.SiteB.Article
    

    I was hoping that if I split

    Is that even possible? How should I handle such situations? Or should I just avoid having multiple websites inside a single Umbraco installation?

    Kind regards

    Gilles

  • 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