Copied to clipboard

Flag this post as spam?

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


  • Bex 444 posts 555 karma points
    Nov 01, 2017 @ 12:01
    Bex
    0

    Duplicating site and all Document Types and Templates in a Single Umbraco

    Hi All

    I am running Umbraco 7.3.0

    I (to start with) want two identical copies of the same site within the same Umbraco but both running off their own templates/views and document types. The First site has already been created and populated. I am now making a copy.

    I know this is may not be the best way of doing this but it's what's I've been asked to do. The reason for this is so that each site can be accessed via the same Umbraco Admin, but although each site will start very similar they may eventually become quite different and we don't want one affecting the other.

    I have copied everything including the document types but I am finding any overridden properties on child doc types aren't showing up.

    Example:

    I have a Master Doc type with a load of properties/tabs. Below this I have a Home Document Type that inherits all the properties of Master as well as having some of it's own.

    On the original [Home] document type a few properties have been added to one of the inherited tabs.

    When I copied the Master and Home document type to Master2 and Home2 I expected Home2 to still inherit from Master2 (which it does) as well as any of the extra properties added to Home to also appear on Home2. This has not happened, only the inherited ones are showing up.

    If I try adding these properties to the Home2 document type it tells me

    the property already exists

    but I cannot see them.

    I assume this is something to do with the Home Document Type still somehow referencing the original Master but getting confused as now it's inheriting from Master2.

    So my question(s) are:

    Is this meant to happen or is it a bug?

    Should I have done it a different way?

    What's my work around?

    I'm thinking I'm going to need to mess with something in the database but so far I am not sure what and am hoping there is another way round this without literally recreating all document types under a different name from scratch!

    Thanks

    Bex

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Nov 01, 2017 @ 12:08
    David Brendel
    0

    Hi Bex,

    why do you copy every Document Type? I would suggest creating new children if it is necessary to have different properties.

    So structure would be Master -> Home -> HomeWebsite1/HomeWebsite2.

    Then add the properties that are specific.

    This way you don't have to copy every Document Type and have names like Master2.

    Also, I would suggest having a look at the compositions feature. It's a nice way of adding different "general" properties more granularly and helps get rid of these inheritance structures.

    Regards David

  • Bex 444 posts 555 karma points
    Nov 01, 2017 @ 12:31
    Bex
    0

    Hi @David

    Thanks for the reply.

    The structure you suggest definitely makes sense but my example was a little simplified. If it had been done at the beginning it would have been better but the structure of the original site is already in place and there are actually 2 on the same Umbraco already, each with their own document types, and both have been running live for a while.

    I don't think I can now change it to a master > home > Website1/Website2(/Website 3) without a lot of work and affecting both existing sites (and confusing the existing devs for the site).

    That said I may be missing something here.. :-/

    Thanks

    Bex

  • John Bergman 483 posts 1132 karma points
    Nov 01, 2017 @ 14:39
    John Bergman
    0

    if you have a lot of overlap between documents, you should think about decomposing them into "parts" that can be composed into your documents as needed.

    For example, in our instance, we have a masthead on most of our pages, so rather than duplicating those properties everywhere, you would create a separate document type for the masthead fields, and then include it via composition in the various pages that need it. This makes your implementation much more flexible than using a base document and a bunch of child ones.

    Then your document naming can be tuned to make more sense rather than using "doc1", "doc2", etc.

Please Sign in or register to post replies

Write your reply to:

Draft