How to add a Link to a Document external to SharePoint
First a Farm Administrator will need to modify a core file on the front end server. Then you must create a custom Content Type. If you use the built in content type you will not be able to link to a Folder directly.
Edit the NewLink.aspx page to allow the Document Library to accept a File:// entry.
- Go to the Front End Web Server \12\template\layouts directory.
- Open the file NewLink.aspx using NotePad. If I have to tell you to take a backup of this file first then you have no business editing this file (really).
- Go to the end of the script section near top of page and add:
function HasValidUrlPrefix_UNC(url)
{
var urlLower=url.toLowerCase();
if (-1==urlLower.search(”^http://”) &&
-1==urlLower.search(”^https://”) && -1==urlLower.search(”^file://”))
return false;
return true;
} - Use Edit Find to search for HasValidURLPrefix and replace it with HasValidURLPrefix_UNC (you should find it two times).
- File – Save.
- Open command prompt and enter IISreset /noforce.
Create custom Content Type
- Go to your Site Collection logged in as a Site Collection Administrator.
- Site actions – Site Settings – Modify All Site Settings.
- Content Types
- Create
- Name = URL or UNC
- Description = Use this content type to add a Link column that allows you to put a hyperlink or UNC path to external files, pages or folders. Format is File://\\ServerName\Folder , or http://
- Parent Content Type,
- Select parent content type from = Document Content Types
- Parent Content Type = Link to a Document
- Put this site content type into = Existing Group: Company Custom
- OK
- At the Site Content Type: URL or UNC page click on the URL hyperlink column and change it to Optional so that multiple documents being uploaded will not remain checked out.
- OK
- Go to a Document Library
- Settings – Library Settings
- Advanced Settings
- Allow Management Content Types = Yes
- OK
- Content Types – Add from existing site content types
- Select site content types from: Company Custom
- URL or UNC – Add – OK
- Click on URL or UNC hyperlink
- Click on Add from existing site
- Add all your Available Columns – OK
- Column Order – change the order to be consistant with the Document content type orders.
- Click on your Document Library breadcrumb to test.
- View – Modify your view to add the new URL or UNC column to your view next to your Name column.
- Go to the Document Library
- New – URL or UNC
- Document Name: This must equal the exact file or folder name less the extension.
- Example: Reviews
- Example: Folders3
- Example: Doc0
- Document URL: This must be the UNC path to the folder or file.
- Example: http://JKsharepoint.BlogSpot.com/Folder1/Folder2/Reviews.doc
- Example: http://JKsharepoint.BlogSpot.com/Folder1/Folder3
- Example: File://\\ServerName\FolderName\FolderName2\Doc0.doc
Some common mistakes are:
- People use the built in Link to Document content type thinking it is the same or will save them a step. It is not the same.
- People click on the NAME field instead of the URL field. They are not the same. You MUST click on the URL field to access the Folder properly.
- People type the document extension in the Name field. You can not type the extension in the name field. It will see it is a UNC path and ignore the .aspx extension.
- People enter their slashes the wrong direction for UNC paths.
HOW TO SHARE FILES AND FOLDERS EXTERNALLY IN SHAREPOINT
https://sharepointmaven.us10.list-manage.com/track/click?u=2151858059c31b8d569544bb7&id=09c3070c9f&e=df6d7ec3a2
No comments:
Post a Comment
Thank you, we will reply soon.