Targetting duplicate (linked) pages


(Paul Duffield) #1

Sorry in advance if this has been answered before. A quick search and I could find nothing related to targeting linked pages.

 

The Issue

We have three websites in Matrix. Site A, Site B and Site C.  Page X was created in Site A and is duplicated (linked) in Site B.

We have tried to create a link in Site C to Page X in Site B, but it keeps defaulting to Page X in Site A. I imagine this is because Page X originated in Site A.

Is there a way to solve this issue? We don't want to have to use an absolute link.

 

Our understanding of linking to linked pages is that:

 

a. If the linked page exists in the same site then it will revert to this instance

b. If the linked page does not exist in the same site (as in issue above) then it will revert to the originating instance (in this case Site A page).

Thus how do we encourage the link to point to the linked page on Site B.

 

Hope this makes sense.

 

Thanks for your help.

Paul.


(Bart Banda) #2

Hey Paul, Matrix will pick the link that is closest to the current URL you are viewing the page on currently.

 

What domains and URLs are on the same page in all three sites?

 

For example, if you've got this:

 

  • site-a.com/similar-page/linked-page
  • site-b.com/linked-page
  • site-c.com/similar-page/page-with-link-to-linked-page

The link on site C will always go to site A because the link URL is closer to that of the page on site-C. 

 

An alternative way of linking might be to use the href value and prefixing the site URL of site B before it? 

 

But not sure if this link is in a template or within the contents of a wysiwyg container on a contents page? 


(Paul Duffield) #3

Hi Bart,

 

Thanks for your response.

 

The link in question is in a wysiwig container on a contents page. I have tried using a href in the URL, however, given that we are assigning the asset number of our target page (to keep everything dynamic), when the web compiler builds the page it is still using the URL of Page A, rather than the URL of Page B, even though I am including the URL of Page A as a href value. Could there be something that I am missing to get this working correctly?

 

Thanks in advance,

Paul.


(Paul Duffield) #4

Hi Bart,

 

Okay, my understanding is that given the link in question is in a wysiwig container and not part of a form/button etc that using the href value is not an option.

Given this, is there any other way to direct a link to Matrix Site A, where the link is defaulting to Matrix Site B because the URL is more similar in Matrix Site B, without making the link absolute?

 

Thanks again, Paul.


(Bart Banda) #5

Don't think so if you are using ./?a= links. There is an idea in Squizmap currently https://squizmap.squiz.net/matrix/3525, but hasn't been progressed in a while due to there being no clear way forward, but something like that would solve your problem (if you always wanted to link to Site A no matter what). 

 

An alternative might be using %globals_asset_url:1234% and running a keyword replace modifier on it to pick the Site A URL over Site B, but not nice in terms of maintainability as you have to edit it in the source code and it won't produce a NOTICE link. 

 

Next step is to look at the URLs for Site B, what are they compared to Site A? Can either domains/URLs be changed slightly so that one is closer to Site C than the other?

 

Also curious, why is the link available on Site B if you don't want to link to it?


(Paul Duffield) #6

Thanks Bart,

I'll have a go at your suggestion to use %globals_asset_url:1234% and run a keyword replace modifier over it. My understanding is that this would keep the link dynamic to some extent.

 

To answer your question as to why this link is available on Site B.

 

Site B is what we call an industry site. It clumps information around a particular industry topic and presents this to our industry audiences.  We have a number of Site Bs, as our services cover a wide range of industries.

 

Site A is our global (primary) site. Often, we link pages between the primary site and the various industry sites.

 

Site C is a campaign site with a limited life span, which we will promote to draw our audience to content on the primary site (Site A), however, in this instance a particular link is defaulting to (the industry site) Site B, which we do not want, as the campaign is not targeted at a specific industry. It is generic to a number of industries.

 

Hope this makes some sense.

 

Thanks again for your help. I'll let you know how I get on.

 

Cheers

Paul.


(Paul Duffield) #7

Hi Bart,

Would this idea work? I put a redirect on Site A, which points to the linked Page on Site A still using the ./?a=links. In my mind, the redirect would go to the Site A instance as it would share the same URL as the redirect. I believe this would keep the link dynamic, however, I am not sure if this might cause other issues. Your thoughts?

 

Cheers

Paul.


(Bart Banda) #8

The Redirect actually sounds like your best option, don't see any issue with that going forwards. Just gotta make sure you update the link back to the normal page link once your campaign site is over, but this sounds like a really good temporary solution.