Related-Assets Listing


(Emily) #1

Matrix Version: 5.5.0

Hi brains trust,

With the “Related Asset Listing” being depreciated, and the Asset Listing now having a “Related Node” & Thesaurus options, is that now the “best” way to do a related-asset list?

I must be doing something wrong in my settings, because I can’t get it to output results.
All the asset listings / search pages have the default for page status (so as a System Admin, I should be able to see the Under Construction assets). (Although I did do a test by setting one Live, but it still did not show up as related.)

Setup:

  • News item page. Has a Paint Layout applied.
  • Paint Layout nests a “Related News” section at the bottom of the page (an Asset Listing).
  • The nested Asset Listing has a Replacement Related Root Node of “Current Asset (asset ID)”. *
  • The nested Asset Listing also has a default Related Root Node, and has a “Thesaurus Filter” set to the News Category Thesaurus. (Is this what I’m meant to do?)
  • The News Items have a metadata field which is a Thesaurus term, “type” (a term from the News Category Thesaurus).

*Will this be reading the Paint Layout, or the Frontend Asset’s Asset ID? Perhaps this is my problem?

What have I missed?
What have I misunderstood?

I can see a number of posts with this problem from around 2007-2009, but none recent using the newer assets - and a number of the older ones link to the old forum URL & thus broken links in answers of “see this thread”.

I also attempted to do it with a Search page for the News Items - using the Nested Content GET variables, but for some reason didn’t work either.
(I setup the Search Page with a stored search on the “Type” field which was set to search a specific metadata field “Type” (a select-dropdown metadata field — a different testing field from the “type” thesaurus one), using the %nested_get_Type% keyword, and the Root Node being where the News Items are stored. And in the Nested Content Additional Options, set the GET Variable “Type” value of “%frontend_asset_metadata_Type%” . I made sure there was another asset with the same “Type” metadata value. As per my other attempt, this Search Page was nested into a Paint Layout applied to the News Item. No results were found by the nested search page.)

I feel like this is a really basic thing, and I must be missing something obvious. I just can’t see what it is…

Thank you once again Squiz brains trust! :slight_smile:
Emily


(John gill) #2

Does the old Related Asset Listing Page pick up the information in Thesaurus type Metadata fields?

As far as I know, a Thesaurus term applied to a page on the Tagging screen is stored entirely differently (sq_shdw_ast_lnk) than a Thesaurus term selected in a Metadata field on a page (sq_ast_mdata_val). I don’t think that Related Asset Listing Pages (or the newly augmented Asset Listing Page in 5.5) can “see” the data in the metadata field.


(Bart Banda) #3

As what John said, the related asset listing only works with Tags added to the Tagging screen, not with metadata thesaurus fields. See https://matrix.squiz.net/manuals/asset-listing/chapters/related-asset-listing for more info.

So if you want to use thesaurus terms with an asset listing you need to use the tagging screen, which works quite differently to metadata fields. If you want to continue to use the metadata thesaurus field you’ll need to use a Search Page.


(Emily) #4

Aha! Yes, I forget that the Related Asset Listing used the Tagging screen, not able to look in metadata. Which explains when I kept choosing not to use in the past.

From what I can see in the manual screenshot, as well as my memory, Edit+ interface does not have an ability for editors to access the Tagging screen/options, correct?

In which case I had better go with the other method of using a Search Page. Although I had tried this last week, and for some reason wasn’t getting it to work:

I also attempted to do it with a Search page for the News Items - using the Nested Content GET variables, but for some reason didn’t work either.
(I setup the Search Page with a stored search on the “Type” field which was set to search a specific metadata field “Type” (a select-dropdown metadata field — a different testing field from the “type” thesaurus one), using the %nested_get_Type% keyword, and the Root Node being where the News Items are stored. And in the Nested Content Additional Options, set the GET Variable “Type” value of “%frontend_asset_metadata_Type%” . I made sure there was another asset with the same “Type” metadata value. As per my other attempt, this Search Page was nested into a Paint Layout applied to the News Item. No results were found by the nested search page.)

I suspect I am doing something wrong with my nested GET variables??

I will keep fiddling on it a bit more today, and if I solve it I will put an update here. :slight_smile:


(Emily) #5

Still no luck with my fiddling, so I’m posting some screenshots of my setup in the hope someone will be able to find what I have wrong.
The metadata field I am using is a Select field (not thesaurus) for this. (Single select)
I thought maybe I was overthinking it with using the variables on the nested content container - maybe all I need to use is the %fronend_asset_metadata_Type% keyword, since I am wanting to find those tagged the same as the page being viewed. But I have also tested by trying to pass a GET variable to the Nested Search Page.

The Nested Search Page is nested into a Paint Layout, which is applied to the News items. Since I was attempting with the %frontend_% keywords, this should have avoided PL problems that sometimes occured using %globals_%

Search Page Fields setting:

Search Page stored search:

Search Page is set to show all asset status’, and to show News items.
I have tried setting the assets live, just in case, but did not help.
I have tried changing the keyword to _value% and _key% just incase it was trying to match the opposite halves, but not luck. (I also double-checked by making Key & Value the same).
I have set my root node, as per normal. No other restrictions have been selected.

I am hoping this is something obvious that jumps out at someone. :slight_smile:

Thank you again for helping!
Emily


(John gill) #6

I think you want the source to be “Set Value” rather than “Any Super Global”

Edit: And remember that Search Pages are subject to the limitations of the search index, including the settings in Search Manager. If you are using tags which are shorter than the Minimum Word Length then I wouldn’t expect them to work.


(Emily) #7

Good thought! :slight_smile: I had forgotten about the Search Manager. The indexing was turned off! I had forgotten it was turned it off a year ago when they switched the site search over to use Algolia instead. (I am currently working on a demo site, not a live one, so it hasn’t needed indexing until now).

Unfortunately it didn’t fix the problem though, even after reindexing the relevant root node. :frowning:
I updated the Stored Search to be “Set value”, as suggested, too - but no luck.
It could be a delay from the server cache, but I haven’t normally had this problem with Search or Listings being cached in the past (and I know Matrix won’t be caching it, although I am using the nocache anyway).
:thinking:

My “type” values are long enough not to activate the 4-letter index length, so that’s not a problem thankfully. :slight_smile:


(John gill) #8

As far as I can see what you’re trying to do does work in 5.5, so it’ll be a matter of finding the issue in the setup.

I’m not totally convinced that reindexing part of a site does anything, I’d do a full reindex out of paranoia. After that I’d try searching for the “type” values in the admin search box. If your news items don’t show up in the results then you know you’ve still got an index problem.