Created
May 1, 2024 16:56
-
-
Save fmontes/cd792eb2136888a6b75a6d317acde05c to your computer and use it in GitHub Desktop.
Return JSON from a dotCMS widget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set($widgetJson={}) | |
#set($conlist=[]) | |
#foreach($con in $dotContentMap.startingUp) | |
#set($conMap={}) | |
#set($dummy = $conMap.put("title", $con.title)) | |
#set($dummy = $conMap.put("urlTitle", $con.urlTitle)) | |
#set($dummy = $conlist.add($conMap)) | |
#end | |
#set($dummy = $widgetJson.put("startingUp", $conlist)) | |
$!dotJSON.put("widgetJson", $widgetJson) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment