Hi Robert,
You have two choices :
1. improve the macro to check the real existance of content
2. add before call the macro some code like this :
<#if SOME_CONTENT_ID?has_content>
<#assign content=delegator.findOne( "Content",
org.ofbiz.base.util.UtilMisc.toMap("contentId", SOME_CONTENT_ID), true)/>
<#if content?has_content><@renderSubContent
subContentId="SOME_CONTENT_ID" /> </#if>
</#if>
Nicolas
Robert G. a écrit :
hey,
I get content from Database with:
<@renderSubContent subContentId="SOME_CONTENT_ID" />
this works fine as long as this resource exists. But is there a possibility
to check if it exists to avoid error messages?
I mean sth like "?if_exists" like the check with FTL variables.
--
View this message in context:
http://ofbiz.135035.n4.nabble.com/subcontent-inf-FTL-when-exists-tp4638469.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/