|
|
| Author |
Message |
< Erlyweb mailing list ~ How complicated can erltl expressions be? |
| Guest |
Posted: Mon Nov 05, 2007 3:36 am |
|
|
|
Guest
|
On Oct 18, 12:09 am, David King <dk...@ketralnis.com> 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 erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|