Maybe this isn't good coding or whatever, but normally
I do something like this:
<%
if {$condition} {
set html [subst {hello i like to eat death}]
} else {
set html [subst {hello i don't like to eat death}]
}
# other code
ns_puts $html
%>
It makes it somewhat easier to separate code from
display, but there are much better ways to do that
anyway...
-derek
--- Alex Harvey <[EMAIL PROTECTED]> wrote:
> Is it possible to conditionally include HTML within
> an ADP?
>
> Something like this is possible in ASP, PHP or JSP
> but I can't seem to get it to work correctly in my
> ADP.
>
> <%
> if {condition} {
> %>
> some HTML
> <%
> }
> else {
> %>
> some different HTML
> <%
> }
> # more script again
> %>
>
> If something like this is not possible, then what is
> the best possible way to render large amounts of
> conditional HTML? Is there some other feature to
> TCL/ADP that I'm overlooking?
>
> Thanks,
>
> Alex Harvey
=====
"Are you going to spend the rest of your life selling sugar water, or are you going to
come with me and change the world?"
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/