1

We have SharePoint 2010 and I have Designer 2010 installed. A user has requested a right-click menu option to "Open in Explorer" on a File or Folder in a Library instead of having to click Library, Open with Explorer.

In Designer, I added a Custom Action LIM for the Library, but can't figure out what the action should be. I used the existing Open with Explorer and copied the URL to the Navigate to URL box but it doesn't work.

Any ideas?

0

I don't think you can do it through the 'Custom Action' function. You'd probably have to build a custom action using Visual Studio.

Another option - the one I used - is to replace the list view with a dataview web part built in SP Designer. Then at the top of your DVWP you can add a toolbar with whatever buttons you want. Using JavaScript, you can grab the RootFolder parameter from the URL and then pass it to your button like so:

<input type='button' value='Explore' onClick='javascript:CoreInvoke(&quot;NavigateHttpFolder&quot;,&quot;" + RootFolder + "&quot;,&quot;_blank&quot;);'/>

In 2013, you can do the same thing using a JSLink file instead of needing a DVWP, which IMO is a lot easier. JSLink is one of the better features offered by 2013 over previous versions.

Note that you'll need to tweak that button code for it to work, but the important part is that you call the CoreInvoke function and then pass the 'NavigateHttpFolder' operation and the URL value. Also, keep in mind that the RootFolder parameter is relative, so you may have to build out the first part of the URL in your script prior to passing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.