On 12/20/2010 04:18 PM, Gerritjan Koekkoek wrote:
Thx,
The Inline versus Block makes sense. It fixes almost my problem
The \div versus /div was a typo, not really creating the macro error. It just displayed the<\div> statement
So now the macro seems to work with one strange problem... I call the macro in a foreach statement. It fails the first loop; displaying the same error! The second and all the other loops (32) present the result i want
So I called the macro before I enter the loop once, now the loop woks fine. But the macro error on the initial call keeps coming. Is it because these empty-line block seperator
So now my macro looks like; #macro(ShowFlag $CountryCode) #set($ImageExtension = '.png') #set($CountryCodeFile = $CountryCode + $ImageExtension)
{{html clean="true"}} <div class="flags"> <img src="../../download/CdLSAssociations/FlagAttachments/$CountryCodeFile" alt="$CountryCode" title="$CountryCode"/> </div> {{/html}} #end
Note I only needed one preceeding empty-line. Marius suggested one-way-of-doing; what are other ways?
The error is that there's still a missing or an extra newline somewhere before the loop. Just add one more empty line before the #foreach. -- Sergiu Dumitriu http://purl.org/net/sergiu/