How to get dataset form data fields from global page content area?
Author: ldriver
Publication Date: 4/19/2017 3:13
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.
Tags: content_area, dataset, global_page_body
-
Author: sense - 4/19/2017 16:54
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)$
0 -
Author: ldriver - 4/19/2017 21:11
This works! Thank you.
0
Please sign in to leave a comment.
Comments
2 comments