Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

The way Link to a Document works is that I need to go to the place where I want the link to appear. Click this content type and then provide the URL to the document in some remote location. This makes sense if the location is outside of my site collection, but it is annoying if the document is in my site collection. Is it possible to do one of two things:

  1. when you select Link to a Document, you are given a choice of pasting in your link or browsing the documents in the site collection (while filtering our the locations and documents that current user does not have access to). This way the user would not have to know the URL of the document beforehand.
    Or
  2. When I click on the document I have an option to send a copy of it to some location in the site collection. Add an option to make a link to the document at the target location and create a browsable menu of available locations.

If a tool like that already exists, great if not, how hard would it be to code something like this up?

share|improve this question
add comment

1 Answer

what we do is using a "AssetUrlSelector" which can be found in "Microsoft.SharePoint.Publishing" DLL.

Just include

<%@ Register Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Publishing.WebControls" Tagprefix="CMS" %>

into your page and

                <CMS:AssetUrlSelector
                DefaultOpenLocationUrl="~SiteCollection/Gallery/"
                DefaultToLastUsedLocation="false"
                DisplayLookInSection="false"
                OverrideDialogFeatures="resizable: yes; status: yes; scroll: yes; help: no; dialogWidth:800px; dialogHeight:600px;"
                OverrideDialogTitle="Custom Picker Title"
                OverrideDialogDescription="Custom Picker Description"
                OverrideDialogImageUrl="~Site/PublishingImages/AssetPickerLogo.jpg"
                AssetTextClientID="AssetTextClientIdentityImage"
                ClientCallback="function(returnedUrl) { imgNews(returnedUrl) }"
                id="assetSelectedImageIdentity" 
                UseImageAssetPicker=true 
                runat="server" /> 

where to select URL.

Hope it helps,

Andrew

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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