Search with Asset Listing

Hi, I am trying to make an ajax call to Asset Listing,
For example,

latest-post <— Asset Listing
Folder 213, 214 ( Standard Pages are in the folders)

/latest-posts?node=213

If I make ajax call to that url, that will returns assets in 213 folder.
Then if I send

/latest-posts?node=214

this would return assets in 214 folder.
I have no idea how to make this… Please help!

Hi
You would use a dynamic root node passed in via a Get Variable:
https://matrix.squiz.net/manuals/asset-listing/chapters/details-screen#Dynamic-Parameters
Thanks
Peter

What I had set is

Dynamic Parameters
Replacement Root node for the listing (must be a child of the static root node) - Get Variable Name : node

If dynamic root not found : Return empty result
If asset selection not specified : Return empty result

And I called this asset listing as /latest-posts?node=213
returns No results were found

Anything wrong with my steps?

What’s your other settings on the asset listing set to? Such as static root node, asset types, statuses to list etc… ?

Asset Types to List : Standard Page
Asset Statuses to List : Live
Root Nodes : Empty (GET variable Node will point to Root)
Root Node Logic : Assets must be a child of at least ONE root node
Direct Links only : No

Solved :slight_smile: Root Nodes must not be empty

2 Likes