Displaying a Key/Value field's data


This code shows how to display the data in a Key / Value field on a content type.

In this example the content type name is Products and the Key/Value field name is Specs.


${esc.h}foreach(${esc.d}con in ${esc.d}dotcontent.pull("+structureName:Products",10,"modDate desc"))

${esc.h}foreach (${esc.d}map in ${esc.d}
${esc.d}map.key : ${esc.d}map.value

Have you created code you'd like to share with the dotCMS community?

Share your code Become a Contributor