This section of the documentation discusses a similar issue that may help
you:

https://docs.racket-lang.org/web-server/templates.html?q=web%20server#%28part._.Gotchas__.Iteration%29

--
Jay McCarthy
Associate Professor @ CS @ UMass Lowell
http://jeapostrophe.github.io
Vincit qui se vincit.


On Sun, Nov 1, 2020 at 12:22 PM Ben Greenman <benjaminlgreen...@gmail.com>
wrote:

> Thats the nor
>
> On 11/1/20, krs...@gmail.com <krsa...@gmail.com> wrote:
> >
> > Hi!,
> >
> > I am using web-server/templates
> > <https://docs.racket-lang.org/web-server/templates.html?q=web%20server>.
> > I am confused why this just displays the last line?:
> >
> > @when[#t]{
> > <h1>first</h1>
> > <h1>second</h1>
> > }
>
> That's normal "when" behavior
>
> ```
> Welcome to Racket v7.8.0.5 [cs].
> > (when #t "first" "second")
> "second"
> ```
>
> One fix is to put a list of text in the `when` body. He's how I'd write it:
>
> ```
> #lang at-exp racket
>
> @(define (when-logged-in . pc*)
>    (when #t
>      pc*))
>
> @when-logged-in{
>   <h1>first</h1>
>   <h1>second</h1>
> }
> ```
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAFUu9R5y6%2B6dCeEYEYRTmKVcHr%3DgZQ9UbztXyy82hKD6AxjPNA%40mail.gmail.com
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAJYbDanKtsLhNXG8T2jo5MGsk9n8hZv5nHd0DbhVS%3DXR46ZLdw%40mail.gmail.com.

Reply via email to