Hi Gerritjan, On 12/20/2010 03:21 PM, Le Génie wrote:
Hi,
I don't know if it is the answer but in your copie of the code, you type <\div> in place of</div>.
Regards, Maxime
2010/12/20 Gerritjan Koekkoek<[email protected]>
Hi I get this error (Failed to execute the [html] macro) if I change the following:
#macro(ShowFlag $CountryCode) #set($ImageExtension = '.png') #set($CountryCodeFile = $CountryCode + $ImageExtension) {{html}} <img src="../../download/CdLSAssociations/FlagAttachments/$CountryCodeFile" alt="$CountryCode" title="$CountryCode"/> {{/html}} #end
to this
#macro(ShowFlag $CountryCode) #set($ImageExtension = '.png') #set($CountryCodeFile = $CountryCode + $ImageExtension)
{{html clean="true"}}
clean=true by default so you don't need it.
<div class="flags"> <img src="../../download/CdLSAssociations/FlagAttachments/$CountryCodeFile" alt="$CountryCode" title="$CountryCode"/> <\div> {{/html}} #end
Why does adding the<div class...> and</div> give this error?
The HTML macro was generating in-line content (just an IMG tag) and now, due to your change, it generates block level content (DIV is a block level HTML element). You have to make sure the HTML macro is not called in an in-line context. One way to do this is to add an empty line before and after it (the empty line is a block separator in xwiki/2.0 syntax). Hope this helps, Marius
Gerritjan _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users