Yes, using code would certainly make some things easier, but for the moment, I'm looking for a template solution.
On Monday, March 18, 2019 at 11:41:41 AM UTC-4, Jérôme Martin wrote: > > (define (my-server-response show-cat?) > (response/xexpr > `(div ([class "my-content"]) > ,(if show-cat? > (p "Welcome to my blog about cats!") > (p "This blog is definitely not about cats."))))) > > On Monday, March 18, 2019 at 4:26:16 PM UTC+1, Brian Adkins wrote: >> >> How would one translate the following Ruby template into a Racket web >> template (including multiple lines for the if and else clauses) ? >> >> <% if true %> >> <p> >> This will be displayed if true >> </p> >> <% else %> >> <p> >> This will be displayed if false >> </p> >> <% end %> >> >> I've read a fair amount of doc and was unable to find a simple example >> like the above. I think this is a pretty common need, so an example in the >> docs would be awesome. The "for" example with the recommendation to use >> "in" was helpful. >> >> Thanks, >> Brian >> > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.