RadEditor for ASP.NET

RadEditor Send comments on this topic.
TemplatePaths Property
See Also  Example
Telerik.WebControls Namespace > RadEditor Class : TemplatePaths Property


Gets or sets the paths where the RadEditor will look for templates.   

 

Namespace: Telerik.WebControls
Assembly: RadEditor (in RadEditor.dll)

Syntax

Visual Basic (Declaration) 
Public Property TemplatePaths As String()
Visual Basic (Usage)Copy Code
Dim instance As RadEditor
Dim value() As String
 
instance.TemplatePaths = value
 
value = instance.TemplatePaths
C# 
public string[] TemplatePaths {get; set;}

Return Value

A string array which contains the paths where the RadEditor will look for templates. The default value is empty string array.

Example

This example demonstrates how to set the TemplatePaths , UploadTemplatePaths and DeleteTemplatePaths properties in the ASPX or in the code-behind:

<rade:radeditor
runat="server"
id="RadEditor1"
templatepaths="~/UploadTemplates,/Templates/Temp,/Templates/Default"
uploadtemplatepaths="~/UploadTemplates,/Templates/Temp"
deletetemplatepaths="/Templates/Temp">
</rade:radeditor>

In this specific example the users of the application will see three folders in the Image Manager dialog: UploadTemplates, Default and Temp.

When browsing the UploadTemplates and Temp folders, the Upload Template tab will be enabled; otherwise it will be disabled.

When browsing the Temp folder, the Delete button in the Choose Template tab will be enabled; otherwise it will be disabled.

The Templates folder will not be browsable. If you want to allow the users to browse it you should add "/Templates" to the list.

Visual BasicCopy Code
RadEditor1.TemplatePaths = New String(3) {"~/UploadTemplates", "/Templates/Temp", "/Templates/Default"}
RadEditor1.UploadTemplatePaths = New String(2) {"~/UploadTemplates", "/Templates/Temp"}
RadEditor1.DeleteTemplatePaths = New String(1) {"/Templates/Temp"}
C#Copy Code
RadEditor1.TemplatePaths = new string[3] {"~/UploadTemplates", "/Templates/Temp", "/Templates/Default"};
RadEditor1.UploadTemplatePaths =
new string[2] {"~/UploadTemplates", "/Templates/Temp"};
RadEditor1.DeleteTemplatePaths =
new string[1] {"/Templates/Temp"};
    

Remarks

If a folder is present in UploadTemplatePaths or DeleteTemplatePaths, but is missing from TemplatePaths it will not be visible in the Template Manager dialog.

Use "~/" (tilde) as a substitution of the web-application's root directory.

Note: in the ASPX declaration the folders are comma separated string; in the code behind they are string array.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also