This is a migrated thread and some comments may be shown as answers.

Error in LinkManager in 5.4.1.0?

3 Answers 70 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
ajd
Top achievements
Rank 1
ajd asked on 21 Jun 2009, 08:26 AM
This is what I have set in my ConfigFIle.xml

<property name="DocumentsPaths">
   <item>/</item>
 </property>

This is what I have in my ToolsFile.xml

  <tool name="LinkManager" shortcut="CTRL+K" />

When I go to add a link and select the document icon, no folders appear and I see a "NOT FOUND" error. I then get an error saying that the list doesn not exist.

I have a screenshot if that helps.

Also, when adding hyerlinks by this method, will the links be added as relative. I have a scenario where I have the same application accessed on multiple Urls (Alternate Access Mappings) and links cannot include the domain name. If "site1" is my site collection name on a managed path then the link must be stored as /site1/web1/Pages/default.aspx NOT http://www.mydomain.com/site1/web1/Pages/default.aspx

Thanks.

3 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 22 Jun 2009, 10:54 AM
Hi Adam,

The DocumentsPaths property work only with existing SharePoint libraries. If you do not set this property all the libraries in the current site will be loaded. If you warn to load libraries of the root of the site collection you need to specify them separately.
For example:
<property name="DocumentsPaths"
    <item>/Documents</item> 
    <item>/Images</item> 
    <item>/CustomLibrary</item> 
</property> 

Regarding your other question, the link will be added as relative. The href value of the anchor will match the value of the URL text field of the Link Manager.


Sincerely yours,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ajd
Top achievements
Rank 1
answered on 24 Jun 2009, 01:02 PM
Thanks for the reply.

This is not a workable solution for me as the content will be dynamic and I do not know in advance what document libraries will exist.

Do Telerik intend to provide the functionality to browse the whole site collection, like the MOSS asseet picker? This is a must in my opinion.

I do not want to revert to the MOSS asset picker as it injects absolute Urls whis is a real problem if you are exposing you content across multiple Urls (Alternate Access Mappings) with different authentication.

Thanks.
0
Stanimir
Telerik team
answered on 24 Jun 2009, 01:36 PM
Hi ajd,

Unfortunately we do not intend to implement the desired functionality. One solution of your problem is to use the default MOSS asset picker and create a custom content filter of the RadEditor that will strip the absolute path.

In order to do this follow these steps.

1. You should use the OnClientLoad property of the RadEditor to attach a handler. To do this you should add the following line in the ConfigFile.xml or ListConfigFile.xml, which are located in the Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.4.1.0__1f131a624888eeed\Resources folder.
<property name="OnClientLoad">OnClientLoad</property>  

2. You can use MOSSEditorTools.js to add custom java script code to RadEditor. There you should define the OnClientLoad handler and your custom content filter.
Here is an example of how these should look.
function OnClientLoad(editor, args)  
{      
    editor.get_filtersManager().add(new MyFilter());  
}  
  
MyFilter = function()  
{  
    MyFilter.initializeBase(this);  
    this.set_isDom(false);  
    this.set_enabled(true);  
    this.set_name("RadEditor filter");  
    this.set_description("RadEditor filter description");  
}  
MyFilter.prototype =  
{  
    getHtmlContent : function(content)  
    {                        
        var newContent = content;  
          
        //here you replace absolute URL 
        newContent = newContent.replace(/http:\/\/mossrtm\//g, "");  
        return newContent;  
    },  
  
    getDesignContent : function(content)  
    {                        
        var newContent = content;  
        return newContent;  
    }         
}  
              
MyFilter.registerClass('MyFilter', Telerik.Web.UI.Editor.Filter);  

Just add this code in the end of MOSSEditorTools.js, which is located in the mentioned above folder.

Once you follow these steps, the absolute part of the URL should be stripped.

I hope this helps.


All the best,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
WebParts for SharePoint
Asked by
ajd
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
ajd
Top achievements
Rank 1
Share this question
or