Lift templates lack obvious stuff (?)

16 views
Skip to first unread message

inca...@whiteants.net

unread,
Aug 16, 2009, 2:34:26 PM8/16/09
to Lift
Greetings. I've googled quite a while for a very obvious feature that
all templating engines out there have and it seems like Lift does not.
I'm talking about multiple bind tags in a template.
Example should explain best.

<html>
<head>
<title><lift:bind name="title"/></title>
<body>
<div id="featured"><lift:bind name="featured"/></div>
<div id="social"><lift:bind name="social"/></div>
<div id="content"><lift:bind name="content"/></div>
<div id="contentInfo"><lift:bind name="content-info"/></div>
</body>
</html>

So how am I supposed to insert parts of contents into these bind
locations? In Facelets the ui:composition/ui:insert/ui:define tags do
the job. And I rather do not understand the intention to have multiple
bind locations in template while the lift:surround tag only allows one
'at' attribute. Can somebody explain this design please?

marius d.

unread,
Aug 16, 2009, 4:36:57 PM8/16/09
to Lift
You can use multiple bind pointx by the means of

<lift:surround with="default">

<lift:with-param name="social">Your tag soup</lift:with-param>
<lift:with-param name="content">Your tag stue</lift:with-param>
...
<l/ift:surround>

tag.

Br's,
Marius

On Aug 16, 9:34 pm, "incarn...@whiteants.net"

inca...@whiteants.net

unread,
Aug 17, 2009, 4:32:23 PM8/17/09
to Lift
Oh, it certainly make more sense now, thanks a lot. My only concern is
that "with-param" is not very self-descripting name for this feature.
I would suggest something like
<lift:surround with="template">
<lift:insert at="social">
<div id="advertisement">...
</lift:insert>
</lift:surround>
Any markup should be readable and have some semantics. And it should
be documented in very basics, I presume.
Thanks again, Mr. Marius.
Reply all
Reply to author
Forward
0 new messages