Copied to clipboard

Flag this post as spam?

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


  • Patrick Hansen 12 posts 82 karma points
    Apr 14, 2019 @ 07:43
    Patrick Hansen
    0

    Multisite setup with content Finder, get parent? - Umbraco 8

    Hey everyone

    I am currently creating multiple sites which will be sharing articles. I am using the ContentFinder to find the articles and insert them correctly and everything works great, however my breadcrumb and navigation fails since the parent and ancestors are different.

    I tried to follow the guide here: https://our.umbraco.com/forum/using-umbraco-and-getting-started/85100-running-multiple-sites-single-installation-with-a-fall-back-default-site#comment-269539

    Idea is that the content I found still knows about the existing contentrequest from:

    UmbracoContext.PublishedRequest
    

    However the domain is null, anyone knows how to accomplish this using Unbraco 8 ?

  • Søren Gregersen 441 posts 1884 karma points MVP 2x c-trib
    Apr 14, 2019 @ 09:34
    Søren Gregersen
    0

    A simple solution we have used, is to let the contentfinder add a "where are we"-value to the httpcontext-items. when rendering breadcrump, nagivation etc, they are based on that value, instead of the actual node from the other site.

    The "where are we"-value is found by "hacking" the URL. We remove the part that identifies the article from the other site, and use the rest to lookup the parent / site.

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Apr 15, 2019 @ 06:45
    Dave Woestenborghs
    0

    Another option is to have custom implementation of IPublishedContent.

    You could pass in the context item (aka where you want to render it in the site) and the article item.

    You will use the article item to return all items. And your context item to set the parent and path. That way your breadcrumb code will work.

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft