I'm using a freemarker template to display web contents listed in an asset publisher.
In the template I'm trying to assign the portlet-namespace in order to use some asset features (like printing the entry) like this
<#attempt>
<#assign namespace = request["portlet-namespace"]>
<#recover>
<#assign namespace = 'undefined'>
</#attempt>
So, the print button is holding te code below
<a href="javascript:${namespace}printPage_0();" title='Print'>
printPage
is the method used in liferay asset publisher code in asset_print.jspf
Well, everything is working fine: when inspecting the page in a browser, I verified that the namespace has been calculated and assigned to namespace variable as well (and no error displayed in UI). However, liferay portal logs the following each time a user tries to see the whole web content (ie. clicks on read more) from the asset publisher
Expression request["portlet-namespace"] is undefined on line
Anyone has seen this problem ? Is there another way to get the portlet-namespace in a freemarker template ?