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.
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.
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:
However the domain is null, anyone knows how to accomplish this using Unbraco 8 ?
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.
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
is working on a reply...