In ErlTL, the content between <% and %> must be a complete Erlang
expression, not a fragment thereof. I've thought about supporting the
kind of usage you've shown, but doing so will probably require a
rewrite of the ErlTL compiler. The best of doing this right now is
using a function, e.g.

<%@ row(false) %>
<%@ row(true) %>
<tr>
  <td colspan="2">
    <% do_something() %>
</td>
</tr>

This has worked well enough for me so far, but I agree that your
approach can make it easier to read the code and figure out which
markup goes where.

Yariv

On 10/17/07, 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 %>
>
> But when I do, I get:
>
> ([EMAIL PROTECTED])14> erlyweb:compile(Appdir,[native,debug_info,
> {erlydb_driver,mnesia},{auto_compile,true}]).
> debug:erlyweb_compile:364: Compiling ErlTL file "post_view"
> ** exited: {error,{parse_error,{1,
>                                  erl_parse,
>                                  ["syntax error before: ",["'.'"]]}}} **
>
> Am I doing something wrong, or is that just not supported?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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