<lift:Menu.item name="LostPasswordApplicant">Glömt lösenord?</lift:Menu.item>
which I would like to replace with CSS bindings. But
<a class="lift:Menu.item?name=LostPasswordApplicant">Glömt lösenord?</a>
turns into two anchors:
<a href="/customer/lost_password"></a><a href="#">Glömt lösenord?</a>
which isn't what I want. This kindof works:
<span class="lift:Menu.item?name=LostPasswordApplicant">Glömt lösenord?</span>
->
<a href="/customer/lost_password"><span>Glömt lösenord?</span></a>
But I'd much rather drop the span due to styling issues.
I'm feeling thick as a brick again…
Thanks,
Viktor
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
I'm thinking the difference you're describing is kind of an impedance
mismatch between css and old style binding and many of these built-in
snippets I guess are made for the old style of binding. Or maybe they
aren't _that_ many really. But then again, there might be some low
fruit making them easier to use out of the box for css binding…? I
mean for attracting newcomers if we say css binding is the way to go.
I guess this has already been discussed though :)
Thanks again!
Viktor
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
Thanks for pointing this out. Of course they are not the same, I just
started using them simultaneously. I shouldn't be posting when my
brain has gone home :)
Ticket opened (I assigned it to DPP):
http://www.assembla.com/spaces/liftweb/tickets/1126-add-flag-to-menu-item-that-swallows-the-surrounding-elem-
Thanks,
Viktor
Wouldn't it be possible to make this as a general feature for all snippets? So that I could add that flag anywhere and surrounding Elem would be swallowed before it is passed to the snippet method? I have quite many snippets with this flag coded in, so I think it would be handy for more people from Lift community.
> I think some other forms of this issue have come up before. Perhaps it was
> forms and lift:loc? Jeppe, do you know what I'm thinking of?
Maybe :-) Haven't read all the details in this thread.
I did add a method to the Loc snippet so you could write
<h2 class="lift:Loc.i">MyHeading</h2>
I.e. keep the h2 elem and use MyHeading as property key. This makes for
nice designer friendly localization.
I think the same could be used with the Menu snippet. But how to solve
the translation issue then?
One option could be to allow:
<a class="lift:Menu.item">LostPasswordApplicant</a>
which would add the correct href and translated menu name...
/Jeppe
Maybe :-) Haven't read all the details in this thread.
> I think some other forms of this issue have come up before. Perhaps it was
> forms and lift:loc? Jeppe, do you know what I'm thinking of?