for example
When you click on it, there is never a way to navigate back up a level like you have with Windows Explorer and often users really get confused by it. And the breadcrumb above won't show anything to allow the user to navigate back up unless they break into the Shared library's AllItems.aspx page. Often you just get a message on the webpart like below.
Simply add some script like below into a CEWP. It will simple write a back button in JavaScript when one of the folders for the designated webpart that you want the back button to appear for to appear.
<script type="text/javascript">
var url = window.location.href;
if (url.toLowerCase().indexOf('&folderctid') > 0 && url.toLowerCase().indexOf('myshared') > 0 && url.toLowerCase().indexOf('documents') > 0)
{
document.write("<a href='JavaScript:history.back();' class='ms-sitemapdirectional'><-- Up a Level</a>")
}
</script>
The code above would show a back button when ever a folder in the webpart that is for the library with name containing "myshared documents" has been clicked on as it is revealed by the query string.
Resulting in a button like the following above the designated webpart. Users can click on it and it has a desirable effect of appearing to allow user to navigate back up a level in the library that they are exploring.
No comments:
Post a Comment