Copied to clipboard

Flag this post as spam?

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


  • Sander Houttekier 114 posts 163 karma points
    Oct 13, 2009 @ 15:10
    Sander Houttekier
    0

    how to: have duplicate pages without duplicate content?

    We are currently working on a website, wich has serveral toppages (under the homepage so serveral level2 pages)

    some of them have similar suppages,

    example:

    homepage
    >> page1
    >>>> subpage 1
    >>>> subpage 2
    >> page2
    >>>> subpage 3
    >>>> subpage 1
    >>>> subpage 2
    >>>> subpage 4
    >> page3
    >>>> subpage 1
    >>>> subpage 5
    >>>> subpage 6

    as you can see, subpage 1 is under all 3 top pages, while subpage 3 only eists under page 3.

    we are thus struggling with the idea of the customer beeing asked to maintain 3 times subpage 1's content.
    keeping it up to date, changing something in 1 of the 3, having to update the other 2.

    we have currently no idea how big this problem is, since we have no idea which content the customer wants to add to the site yet.
    but we know that defenatly a few times this will occure...

     

    solution1: if this occures alot: moving all pages in a container, and implementing some sort of contentpicker to select which subpages you want. would be a solution,(alot like how you could select a set of blocks you want to display on a page from a container with all blocks in it...) 

    but we do not feel this will be the right solution here, since it would remove all structure the site currently has, we would need to rewrite some of the breadcrumb script for this too...

    solution2: We could also, make subpage 1 only 1 time, under page1,  and create a second document type wich a umbraco parameter called umbracoRedirect

    this is very suitable for keeping the structure but poses problems with the breadcrumbs since it will physically redirect you to the other page, where breadcrumbs would be shown as  home > page1 > subpage 1   instead of  home > page2 > subpage 1

     

    what do you guys think about this problem, any other solutions

  • Comment author was deleted

    Oct 13, 2009 @ 15:48

    Hi Sander,

    Maybe take a look at umbracointernalredirectid (not sure what it does with breadcrumbs)

    http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracointernalredirectid

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 13, 2009 @ 15:49
    Dirk De Grave
    0

    Hi Sander,

    IMHO, it doesn't make sense to keep multiple copies of the same page!

    I've seen solutions using the container approach for editing the pages, and having another top level node for navigational purposes. You'd build the complete navigation structure using content pickers (and you can still use other doc types as you do in day to day implementations) and have a container node which hold all pages for editing.

     

    Just my 0.02 EUR

     

    Cheers,

    /Dirk

  • Sander Houttekier 114 posts 163 karma points
    Oct 13, 2009 @ 16:07
    Sander Houttekier
    0

    dirk, as i specified in my solution 1, we don't think this would be the right solution since it would break the complete structure of the site. putting 50 pages in 1 container would make pages hard to find.

    we were checking out the redirect at the moment, the internal redirect as Tim says, does what the wiki page says, it redirects without changing the url.

    so in fact it does load the page which umbraco redirects too, so it also loads everything from that page and its template. (meaning, also the breadcrumbs)

    we'll propose this internal redirect to the customer and see what they think, if they think the breadcrumbs are not an issue we will keep it as is.
    otherwise we will need to find a way to do this differenty.

     

    Sander

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Oct 13, 2009 @ 18:57
    Morten Bock
    0

    You could also dig into the relationship api. So if you have a page that appears in many places, then your create the first one, copy it, and check the "related" checkbox. Then you can write an eventhandler that subscribes to pages being published, an updates all related pages when any one of them is published.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Oct 13, 2009 @ 19:22
    Douglas Robar
    0

    Another option would be a 'pointer' docType that would use a content picker to point to the real document and display it's content. When you update the original node all the pages that point to it would be updated as well. 

    You would have to use simple macros rather than umbraco:item's in your templates to get the content from the original/source node. Well, you could use inline xslt in the umbraco:item tag if you want. 

    That would be the simple way of handling it. Be sure to have a different icon for 'pointer' docTypes and your users should understand the arrangement just fine.

    I've done a much more complex solution for sharing content from remote umbraco sites that is based on a similar idea of original/source nodes and 'pointer' nodes. If you're interested in that more elaborate approach you can read about it at:

    http://www.percipientstudios.com/downloads/umbraco/Content%20Sharing%20-%20CodeGarden%202008%20Presentation.pdf (better overview)

    Content Sharing for Fun and Profit (updated with even more capabilities)

     

    cheers,

    doug.

  • Sander Houttekier 114 posts 163 karma points
    Oct 13, 2009 @ 19:40
    Sander Houttekier
    0

    the pointer document type seems interesting though the relations idea kind of looks more appealing to me tbh,

    since the pointer docType idea requires an extra step on the customer's side.

    while it certainly is a bit more work to create a copy handler on my part using the relations api, it provides the customer with no extra effort, they can even choose which node to update if i build the handler correctly, it should also publish any related node... though they will need to copy it perfectly ...

    i don't think there is a way (without creating one) to link 2 nodes after they are created... ?

     

    I am going to look into both ideas, since i still have to estimate how mutch work it is before the customer will agree to just plunge in and make changes :D
    i'll keep this forum updated as to what idea was chosen.

    thanks for al the ideas

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Oct 13, 2009 @ 21:12
    Morten Bock
    0

    > i don't think there is a way (without creating one) to link 2 nodes after they are created... ?

    True. There is no UI to do this in the current version as far as I know.

  • Qube 74 posts 116 karma points
    Jun 08, 2010 @ 04:17
    Qube
    0

    I wrote a CustomControl to handle this issue. Debatable whether its' the best solution (I've seen a few), but it allows sharing content (plus the option to  override values) and isn't a whole lot of code. Well, it's not a whole lot after you cut out my overly verbose comments :P

    Just posted it the source to the topic here.

Please Sign in or register to post replies

Write your reply to:

Draft