Copied to clipboard

Flag this post as spam?

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


  • Gordon 15 posts 96 karma points
    May 08, 2017 @ 10:41
    Gordon
    0

    Reuse page as new node without duplicating originally referenced page

    I have a requirement where I need to repeat a page from one part of the content tree into another part of the tree - without copying or duplicating the original page, i.e. a reference to the original page that is placed in another section of the site.

    If 'Page A' is the source page (of any template and doctype type) and 'Page B' is the target page, an instance of A, I wonder if I could use a Content Picker on B (as a new 'Shared Page' doctype) to select A. Page B then gets the template and model from A via the content picker ID and uses that to render an instance of A...? Can page B use the template and model from A with Layout = "PageA.cshtml" etc?

    I can't just copy the page because I can't have duplicated content, and I can't just have a redirect to Page A because the menu context for B will then be incorrect when the original page is reached.

    I don't think the above is the way to go, but I hope it explains what I need to achieve...

    Any ideas are appreciated! Thanks.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    May 08, 2017 @ 10:58
    Alex Skrypnyk
    0

    Hi Gordon

    It's a good idea to use content picker from page A to page B.

    Are these pages the same docType? Is it allowed to use the same template on these pages in Umbraco?

    Thanks,

    Alex

  • Gordon 15 posts 96 karma points
    May 08, 2017 @ 11:12
    Gordon
    0

    Thanks for the reply Alex.

    Page A could be any one of 3 or 4 different page types (doctype and template). E.g. A standard page, a News Page, a Gallery page etc.

    Page B would only have a simple doctype with the Content Picker and probably little else. It could link to any of the 3 or 4 types of Page A, whichever the editor decides.

    The problem to solve is how can Page A be rendered where Page B is in the content tree, rather than diverting to Page A. It needs to maintain an accurate breadcrumb in the UI etc.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    May 08, 2017 @ 12:44
    Alex Skrypnyk
    0

    Gordon, it's not clear for me - how can Page A be rendered where Page B is in the content tree?

    Do you want to render the same content as Page A in the Page B?

    What is the problem with breadcrumb in the UI?

  • Gordon 15 posts 96 karma points
    May 08, 2017 @ 12:53
    Gordon
    0

    Yes, I need to render the content from Page A in Page B.

    Using breadcrumb only as example of what I am trying to solve, I may have the original page A here:

    Home > News > Page A

    My editors may then want to use Page A content again but in another section of the website, e.g.

    Home > About Us > Page A

    However, I cannot duplicate Page A into the About Us section because they do not want two pages to maintain - I need a reference to Page A instead, so Page B is in effect a reference to Page A, like this

    Home > About Us > Page B

    What I can't have is the Page B in About Us link redirecting back to Home > News > Page A

    Thanks for your time trying to figure out what I'm trying to describe :o)

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    May 08, 2017 @ 12:55
    Alex Skrypnyk
    0

    Gordon, the best way to do is to use content from Page A, so create page B with content picker "copyDataFrom", select page A and you will not have such problems.

    It tree you will have Page A and Page B, but all content will not be duplicated it will be only in one place in Page A.

  • Gordon 15 posts 96 karma points
    May 08, 2017 @ 13:14
    Gordon
    0

    That's correct, that's what I'm aiming to achieve.

    In terms of the code, how does Page B use the correct template and use the correct model (as used by Page A)? This is the bit I'm not sure how to do...

  • Gordon 15 posts 96 karma points
    May 08, 2017 @ 13:26
    Gordon
    0

    ...could page B include all the templates from all possible types of Page A, and then set the template to use based on the type of template used by Page A?

Please Sign in or register to post replies

Write your reply to:

Draft