Accessing the model - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

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.