简体   繁体   中英

Breadcrumb for Document Library in sharepoint 2010

In sharepoint 2010, I have created one document library and it has been added as a web part to a new page. i want to create breadcrumb just above that webpart to handle hierarchy of folders in webpart and will show "foldername > subfolder > mydocumentfolder" kind of hierarchy, in which foldername n subfoldername are clickable.

Regards, Raji

When you go into a subfolder in the document library you should notice a new query string show up in the browser url.

For Example:

http://mysite.test.com/sites/Accounting/Documents.aspx?RootFolder=%2Fsites%2FAccounting%2FAccounting%20Documents%2FExpense%20Reports

In this case we can break the "Root Folder" query string down as:

  • "http://mysite.test.com" - Web Application Path
  • "sites/Accounting" - Site Collection Path
  • "Accounting Documents" - Name of my document library
  • "Expense Reports" - Name of my subfolder

Using this we can create a custom breadcrumb webpart on the page that reads the root folder from the query string and then strips the web application and site collection paths and uses the remaining information to get the document library and the subfolder names.

For Example:

Display

  • Accounting Documents > Expense Reports

Actual links

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM