Return to doc.sitecore.com

Documentation

 

1.  Introduction

The TreeList package contains a new field type that provides the following functionality:  

Please refer to the Creating a Composite Custom Field article for more information about custom fields.

2.  Installation

The TreeList field is distributed as a standard Sitecore package. Thus, to start using it, you must install the package. Please refer to the Installing Modules and Packages article if you are not familiar with the standard Sitecore Packager tool.

 

After the package installation, you will see the TreeList field in the list of Field types (System/Field types).

 

You can add this field to a template section and create Items based on this template.

 

You need to edit the web.config file to make the control work.

  1. Add the following line to the <controlSources> section 
    <source mode="on" namespace="Sitecore.WebControls" assembly="TreeList" prefix="sc4"/> 
          
  2. Add the following line (if it is not yet present) to the <ui><using> section: 
    <using>Sitecore.WebControls</using> 
     
  3. Add the following line (if it is not yet present) to the <ui><references> section 
    <reference>/bin/treelist.dll</reference>

3.  User Manual

A User can set the conditions that define which Items may be added to the tree list.

These conditions are set in the Source field of the TreeList field.

Create a new field and select TreeList as a field type.

You can adjust the properties of the field by specifying the Source parameters:  

If you want to use several parameters, you should use the ampersand (&) sign to separate each parameter. For example, your Source field might look like this:

 

ControlDataSource=/sitecore/content/home&AllowMultipleSelecton=no&ExcludeTemplates= Document,LinkedDocument

 

In this case, if you try to add an Item twice, you will get the following message: