Implementing "You are here:"

6 views
Skip to first unread message

Julian Backes

unread,
Feb 18, 2010, 9:33:31 AM2/18/10
to lif...@googlegroups.com
Hi,

I want to implement something like "You are here: Root -> Somewhere 1 ->
Somewhere 1.1" which is displayed on all pages.
Is it possible to use SiteMap to do that? Can someone give me a hint how
to do that?

Thanks,
Julian

Jeppe Nejsum Madsen

unread,
Feb 18, 2010, 9:38:03 AM2/18/10
to lif...@googlegroups.com

Have a look at the Menu snippet. I think the li_path prefix can be
used to make a breadcrumb...

/Jeppe

Timothy Perrett

unread,
Feb 18, 2010, 9:49:05 AM2/18/10
to lif...@googlegroups.com
Jeppe, you forgot to mention that the OP needs to implement their sitemap ;)

Cheers, Tim

> --
> 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.
>
>

Julian Backes

unread,
Feb 18, 2010, 9:51:51 AM2/18/10
to lif...@googlegroups.com
>> I want to implement something like "You are here: Root -> Somewhere 1 ->
>> Somewhere 1.1" which is displayed on all pages.
>> Is it possible to use SiteMap to do that? Can someone give me a hint how to
>> do that?
>
> Have a look at the Menu snippet. I think the li_path prefix can be
> used to make a breadcrumb...
The problem is that it still renders all roots.

Assume I have a menu like
Node 1 -> Node 1.1 -> Node 1.1.1
Node 2 -> Node 2.1

and assume I'm visiting Node 1.1.1. Then, I just want to have "You are
here: Node 1 -> Node 1.1 -> Node 1.1.1"

Menu.builder will always construct
Node 1 -> Node 1.1 -> Node 1.1.1
Node 2

i.e., still prints Node 2.

David Pollak

unread,
Feb 18, 2010, 12:40:15 PM2/18/10
to lif...@googlegroups.com

val breadcrumbs: List[Loc[_]] =
for {
  currentLoc <- S.location.toList
  loc <- currentLoc.breadCrumbs
} yield loc

This gives you the list.   
 

--
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
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics
Reply all
Reply to author
Forward
0 new messages