Bread Crumb - Get library of current document (aspx page)
- From: "Sleepy" <mnmarshalls@xxxxxxxxxxx>
- Date: 3 Jan 2006 14:32:19 -0800
This should not be this hard, so obviously my brain is still dead from
the holidays.
I am trying to create a bread crumb navigation but I cannot get further
down than the current area. I want to include the current LIST
(document library) and probably folder, etc.
Right now it shows:
Home > Area > SubArea
I want it to show
Home > Area > SubArea > Document Library > Folder
So here's my bread crumb, working very nicely, get to the current AREA.
How do I get the current Document Library (list) the document belongs
to?
PortalContext ctx = PortalContext.Current;
SPWeb web = SPControl.GetContextWeb(Context);
Area currentArea = AreaManager.GetArea(ctx, web.ID);
output.Write("Back to ");
string s = "<a href='" + currentArea.UrlNavigation + "'>" +
currentArea.Title + "</A>";
while( true )
{
Guid guid = currentArea.ParentID;
if( guid != Guid.Empty )
{
currentArea = AreaManager.GetArea(ctx, guid );
s = "<a href='" + currentArea.UrlNavigation + "'>" + currentArea.Title
+ "</a> > " + s;
}
else
break;
}
output.Write( s );
.
- Follow-Ups:
- Prev by Date: Re: Sharepoint security error
- Next by Date: InfoPath Form Mapping to WSS
- Previous by thread: Re: Sharepoint security error
- Next by thread: Re: Bread Crumb - Get library of current document (aspx page)
- Index(es):