I'm using Liferay 7 and by looking at the default adts for asset publisher I see, in the "Rich Summary" adt, the following portion of code
<#list entries as entry>
<#assign
entry = entry
assetRenderer = entry.getAssetRenderer()
entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry)
/>
...
(see it on GitHub https://github.com/liferay/liferay-portal/blob/master/portal-web/test/functional/com/liferay/portalweb/dependencies/adt_asset_publisher_rich_summary.ftl)
Is there any reason for doing the entry = entry
assignment?
It seems to me like that shouldn't be necessary, am I maybe missing some reason why it might be necessary in freemarker such an assignment?
[edit]
Considering that this way entry
will be defined even outside the list
loop, why was this done? Is it necessary?
In this template there are actually no more references to this variable. So is this assignement needed while creating a new custom adt?