Liferay Portal provides a WebDAV URL to all documents in the Document Library so that you can access the documents from your computer's desktop. While this is a great feature, it can be a little annoying to
1) copy the WebDAV URL
2) open Microsoft Word (for example)
3) click the open icon
4) paste the file's WebDAV URL into the open dialog window.
While this is very straight forward, it's a lot of steps.
To make it easier for your users to open files, you can create a link which will automatically open the file using WebDAV. By opening the file using WebDAV, changes to the file are automatically uploaded back to the server. The user doesn't need to manually upload the file back to the server.
<a href="#" onclick="new ActiveXObject('SharePoint.OpenDocuments.1').EditDocument('<%= webDavUrl %>');">Open Now</a>
This solution is not very flexible, because it will only work with Internet Explorer. But if you're running an intranet site and know everyone uses IE, this can be a great UI improvement for your users.
If you would like to give this a try, you can depoy this sample hook for Liferay Portal 6.0.5. The hook will add an "Open Now" link below the WebDAV URL in the screen seen above.

