Prevent Asset Listing from Using URL

We have two parts of our site that share the same News Item assets. Both parts of the site need to display the News Item under their own URL.

 

So if I visited site 1 and viewed the article, the URL needs to be:

www.puc.edu/news/article1

 

If I visited site 2 and viewed the article, the URL needs to be:

www.puc.edu/now/article1

 

However, our homepage pulls these news articles for display as well, and the root node is set to site 1. But, when I link one of those articles into site 2, the URL on the homepage changes to site 2, and users are directed to the wrong site.

 

I realize Matrix is likely choosing the shortest URL here, but in this case I very much need to restrict which URL is used. 

 

What options do we have here?

Could you use a keyword modifier on the %asset_url% keyword in the asset listing that lists the news items on the homepage?

 

%asset_url^replace:/now/:/news/%

Could you use a keyword modifier on the %asset_url% keyword in the asset listing that lists the news items on the homepage?

 

%asset_url^replace:/now/:/news/%

 

No, that doesn't really sound like a flexible solution, and wouldn't work for us.

I'm not sure what the rest of your setup is like that makes it not a good solution for you, but another alternative might be to use the %asset_urls% keyword and grab the URL from a certain position of that array if you can expect it to be the same each time perhaps?

 

Or perhaps set it as a default metadata text field value and use that instead when printing the URL? 

I'm not sure what the rest of your setup is like that makes it not a good solution for you, but another alternative might be to use the %asset_urls% keyword and grab the URL from a certain position of that array if you can expect it to be the same each time perhaps?

 

Or perhaps set it as a default metadata text field value and use that instead when printing the URL? 

 

I wish I could use the %asset_urls% keyword, but we are on 5.2.3.0.

I got it working. My solution was to just arbitrarily make the URL of Site 2 longer, so that Matrix would not use that one on the homepage.