Search the FirstSpirit Knowledge Base
I need to get data from a dataset in the presentation channel, but using global.page.body("container"). So for example, I can do this and get the template UID:
$CMS_VALUE(#global.page.body("container").getFirstChild().template.uid)$
But on that template is an FS_LIST object which basically just selects a dataset. I need the data from that dataset selected. So I'm stuck on how to get the data form fields from the data set using the content area. For example, I need something like this (this is pseudo code);
$CMS_VALUE(#global.page.body("container").getFirstChild().dataSet.formData.tt_id)$
Not sure what to put beyond getFirstChild, or if getFirstChild is even correct.
This code should give you the correct data
$CMS_VALUE(#global.page.body("container").getFirstChild().formData.get(#global.language, "st_datasets").get.get(0).fs_id)$
This code should give you the correct data
$CMS_VALUE(#global.page.body("container").getFirstChild().formData.get(#global.language, "st_datasets").get.get(0).fs_id)$
This works! Thank you.