Accessing the model - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external - Alfresco/Alfresco-Content-Services/23.4/Alfresco-Content-Services/Tutorials/Develop-a-Platform-Extension/Repository-Web-Scripts-Tutorials/Developing-a-Folder-Listing-web-script/Creating-a-response-template/Accessing-the-model - 2025-11-03

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License
ft:locale
en-US

Response templates have access to the model created by the controller script. Each named value added to the model is accessible as a template root object by its respective model name.

Your Folder Listing controller script placed two values into the model: one named folder, a folder object, and the other named verbose, a boolean. Your response template uses these two values to drive the rendered output on the response:

...
Contents of folder ${folder.displayPath}/${folder.name}
. . .
<#listfolder.childrenaschild>
. . .
<#if verbose>
. . .
</#if>
</#list>
...

The folder object renders properties of the folder and iterates through its children while the verbose flag determines if extra detail should be output.