Dynamic JSON Data Source


#1

Hi Guys,

         

             So here is my set up .....

 

As you can see, we have a number of websites sharing the same 'paint layout' and 'metadata schema'. 

  • The 'Asset listing' is nested in the paint layout.
  • And 'Asset Listing' use 'JSON data source' as its 'Root node'.

So how do I pass the value of metadata 'feed_url' as a JSON data source ? Each website has different 'feild_url' metadata value. The results returned by 'JSON feed' only needs to be displayed on the home page of each website.

 

I have unsuccessfully tried these global keywords ....

  • %globals_asset_metadata_<fieldname>%
  • %globals_asset_metadata_<fieldname>:<assetid>%

But they don't work in this context ....

 

I have also tried a couple of different things in "Source asset for JSON Data"  in "Dynamic Inputs" (screenshot below) but nothing seems to be working.

 

 

Any help is very appreciated ...

 

Thanks in advance ...


(Peter McLeod) #2

Hi

 

 

maybe somethingh like this which will get the id of the index (home) page that is set in the site asset, and then access its feed_url metadata property:

 

%globals_site_index_id^as_asset:asset_metadata_feed_url%
 
I havent tried it in the context you're needing it for but I think it should work.
 
Thanks
Peter

#3

Thanks for your reply Peter. That keyword doesn't print/return anything ....!


(Peter McLeod) #4

Hi

is metadata set to the actual site asset? if so then just apply the schema /set the feed value to the index page instead and then the keyword will pick up the value.

Thanks

Peter


#5

Peter, Thanks so much, its working now ....  :)