velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uday Kumar" <uday.ku...@secf.com>
Subject macro library
Date Mon, 04 Apr 2005 06:22:44 GMT
Hi,

Has anyone developed a macro library for standard html items?  For
example:
 
#macro (html_href $link $text)

<a href='$link'>$text</a>

#end

Regards,
uday 


-----Original Message-----
From: Jason Chodakowski [mailto:jasonc@hyperworx.com]
Sent: Sunday, April 03, 2005 6:22 PM
To: velocity-user@jakarta.apache.org
Subject: Template not rendering


Any thoughts as to why this template snippet won't render? CatMap is a
java.util.HashMap - should it be a Hashtable instead?

Thoughts?

Thanks,

J --

#foreach($Category in $CatMap.keysSet())
#set($SKUS = $CatMap.get($Category))
<P><B>${Category.Name}</B></P>
<!-- Category ${Category.Name} -->
#foreach($SKU in $SKUS)
<a href="/foo?do=snot&id=${SKU.Id}">${SKU.Description}</a><BR>
#end
<!-- End Category ${Category.Name} -->
#end




---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message