can anyone point me to an example showing the use of "HideIfNoKids"?
I'm trying to make a "top menu entry" disappear if the sub menus are not
reachable (via If or Hidden). I'm guessing this is, what that option
intends to do.
A Google search of the web only points to the API entry.
A search of this newsgroup came up empty.
The various books mention its existence, but nothing more.
I've set up a simple nested menu - using Lift 2.0 - like this:
val testSub1 = Menu(
Loc(
"testsub1",
new Link( List("testpath","suba"), false),
"- sub1")
)
val testSub2 = Menu(
Loc(
"testsub2",
new Link( List("testpath","subb"), false),
"- sub2")
)
val testTopMenu = Menu(
Loc(
"testTop",
new Link( List("testpath"), false),
"Test ..."),
testSub1,
testSub2
)
which works as expected:
The top entry "Test..." loads testpath.html and reveals two sub entries
"- sub1" and "- sub" when clicked upon.
If I hide the two sub menus (via Hidden) or make them not accessible
(using If() ), the "Test..." menu entry still remains.
If I use
val testTopMenu = Menu(
Loc(
"testTop",
new Link( List("testpath"), false),
"Test ...", HideIfNoKids),
testSub1,
testSub2
)
the menu entry disappears even if sub1 and sub2 available.
What did I miss?
Thank you
Michael
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
--
--
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
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.