|
Formatting Issue (Whitespace): msg#00179jakarta.velocity.user
I have the following two macros. The content output is fine but the formatting is not how I want it. How can I modify my macros to output the content in the desired format (see below)? #macro(button $index) #if($menu.size() > $index) #set($buttontext = $menu.elementAt($index).alttext) <A HREF="${menu.elementAt($index).link}"><IMG SRC="${req.contextPath}/button_factory?textColor=FFFFFF&bgColor=${accentcolor}&text=${utils.escapeForURL($buttontext)}"></A> #else <!-- empty button --> #end #end #macro(imenu $startindex) #if($menu.size() > $startindex) <TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="600" BORDER="0"> <TR> <TD>#button($startindex)</TD> #set($startindex = $startindex + 1) <TD>#button($startindex)</TD> #set($startindex = $startindex + 1) <TD>#button($startindex)</TD> #set($startindex = $startindex + 1) <TD>#button($startindex)</TD> #set($startindex = $startindex + 1) <TD>#button($startindex)</TD> </TR> </TABLE> #end #end Current Output: <TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="600" BORDER="0"> <TR> <TD WIDTH="89" BGCOLOR="#990000"> <A HREF="menu0link"><IMG SRC="/button_factory?textColor=FFFFFF&BGCOLOR=990000&text=Search"></A> </TD> <TD WIDTH="89" BGCOLOR="#990000"> <!-- empty button --> </TD> <TD WIDTH="89" BGCOLOR="#990000"> <!-- empty button --> </TD> <TD WIDTH="89" BGCOLOR="#990000"> <!-- empty button --> </TD> <TD WIDTH="90" BGCOLOR="#990000"> <!-- empty button --> </TD> </TR> </TABLE> Desired Output: <TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="600" BORDER="0"> <TR> <TD WIDTH="89" BGCOLOR="#990000"><A HREF="menu0link"><IMG SRC="/button_factory?textColor=FFFFFF&BGCOLOR=990000&text=Search"></A></TD> <TD WIDTH="89" BGCOLOR="#990000"><!-- empty button --></TD> <TD WIDTH="89" BGCOLOR="#990000"><!-- empty button --></TD> <TD WIDTH="89" BGCOLOR="#990000"><!-- empty button --></TD> <TD WIDTH="90" BGCOLOR="#990000"><!-- empty button --></TD> </TR> /TABLE> |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | question: 00179, Vaneet Sharma |
|---|---|
| Next by Date: | Sending values to a #parsed template...: 00179, Rodrigo Reyes |
| Previous by Thread: | Questioni: 00179, Vaneet Sharma |
| Next by Thread: | Re: Formatting Issue (Whitespace): 00179, Christoph . Reck |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |