Does anyone know if there is a way to lookup an asset in a Matrix Search page or any other asset type based on the asset’s URL? I’m trying to create a little ajax and looks up extra info for an asset and return some JSON, but the only identifier I will have is the URL. Options in the Search Fields of a Search Page asset don’t seem to allow this.
Search Page - Lookup asset by it's URL
PeterM
(Peter McLeod)
#2
Hi
Had a similar requirement once… I ended up using a listing as the data source for the asset URLs > contents of this (which was structed as JSON data) was nested in a Rest JS asset which did the searching/filtering.
Thanks
Peter
Bart
(Bart Banda)
#3
Nice idea Peter!
I’ve also done it previously by creating a new metadata field that has %asset_url% as a default value, then used the search page to search on that.
Alternatively you could potentially set it up using a DB query using a db data source assset, if you have read access details to the database.
Peter’s REST solution would probably be the quickest though.