I have a scenario where there are several websites powered by Tridion and there are component links that I want to resolve across web publications.
For example: There is a Corporate site: publication ID 14, and a niche site: Publication ID 13.
The Corporate site has an "About Us" page with an "About Us" article component, and the niche site has a component link to the "About Us" article.
My cd_link_conf.xml has the following:
<Publication Id="13"> <Host Domain="mynichesite.com" Port="80" Path="/"/> </Publication> <Publication Id="14"> <Host Domain="mycorporatesite.com" Port="80" Path="/"/> </Publication>
Everything is published into the same broker DB, so the LINK_INFO table contains everything. However, when browsing in the niche site (pub 13) the dynamic link to the About Us article on the About Us page in pub 14 is not resolved. Am I missing some configration, or do I need to have logic to get the "pub 13" TCM URI of the About US component before I try to resolve the link?
---- UPDATE ----
I am now considering writing the following algorithm to get my links working. Since we're using DD4T, I'm planning to extend the IComponent.ResolveUrl() method with the following:
- get component link TCM URI
- try resolve in current pub. If resolve, then return, else...
- try another pub by localizing the TcmUri to the next pub (need to keep/get the list of pubs somewhere)
- try resolve in next pub. If resolve, then return else...
- repeat step 3 until out of pubs to scan or a link is found.
Still not ideal, but if you've done something like this before, please share.