Yes I'd like to know about a different parser to do this. I've been using
ns_puts and ns_adp_include to get around this problem.
Writing code like this is more difficult to maintain as I see it.
----- Original Message -----
From: "Rob Mayoff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 10, 2001 11:05 AM
Subject: Re: [AOLSERVER] conditional code in an ADP
> > Is it possible to conditionally include HTML within an ADP?
>
> Not the way you described. You have to use ns_adp_puts or
> ns_adp_include within the <% ... %> block. For example:
>
> <%
> if {condition} {
> ns_adp_puts {
> some HTML
> }
> } else {
> ns_adp_puts {
> some different HTML
> }
> }
>
> # more script again
> %>
>
> Note that "some HTML" and "some different HTML" must NOT contain any
> <%...%> blocks. If you need nested <%...%> blocks, you'll need to use
> multiple files and ns_adp_include.
>
> I think someone might have once written an alternate ADP parser that
> lets you do what you described. Perhaps someone else on the list knows
> about it.