On Oct 18, 12:09 am, David King <[EMAIL PROTECTED]> wrote:
> I'm trying to do the following in an erltl file:
>
>          <% case Authenticated of
>                 false -> "";
>                 true -> %>
>                    <tr>
>                      <td colspan="2">
>                        <% do_something() %>
>                      </td>
>                    </tr>
>          <%   end %>

Hey David.  I had a response written to this quite a while ago, but I
realized tonight that I never posted it for some reason.  In any case,
in addition to the solution Yariv suggested, I've found something else
to work reasonably well: wrap the longer section in an iolist.  So,
your code above would actually look like this:

    <% case Authenticated of
        false -> "";
        true ->
            ["<tr><td colspan=\"2\">",
             do_something(),
             "</td></tr>"]
       end %>

Yeah, it kind of takes the HTML-likeness out of the thing, but for
short snippets, I've found it works pretty well.

-Bryan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to