question about body tags/templates/views

2 views
Skip to first unread message

John Holland

unread,
Aug 7, 2010, 5:13:46 PM8/7/10
to Conjure
I'm trying to understand the intended use of body tags,the body element,
in templates and views. In the hello world app it seems as if there is a
footer div after the body element is called in /home/index.clj. I am
seeing the footer div come after the </body> closing tag in the html
source. Is this correct HTML? Is this the desired behavior? What I
thought was that the footer div should be within the body (in the HTML).
But the only way I can do this is to put the footer material in the
view, not the template.

I'm expecting that I am doing something wrong. Can anyone help me out?

Thanks,
John Holland

Matthew Courtney

unread,
Aug 7, 2010, 7:53:36 PM8/7/10
to clojure...@googlegroups.com
Actually, it sounds like the templates are wrong. The footer should be
within the body tag. I'll have to take a look at it.

-Matt Courtney

John Holland

unread,
Aug 8, 2010, 12:25:53 PM8/8/10
to clojure...@googlegroups.com
More generally, is there a way to build pages out of fragments - so
that say a div in a layout with an id could be associated with the
output of a view or some kind of method?

Matthew Courtney

unread,
Aug 8, 2010, 2:08:33 PM8/8/10
to clojure...@googlegroups.com
You can call other views from views. Simply import the view you want
to call, then call render-body passing all of your view parameters to
it.

Does that help?

-Matt Courtney

John Holland

unread,
Aug 8, 2010, 8:24:54 PM8/8/10
to clojure...@googlegroups.com
Thanks, that works perfectly.

John H

Reply all
Reply to author
Forward
0 new messages