Item Selector Custom URL eXtension

Item Selector Tree ViewThe Item Selector Custom URL eXtension is a SDL Tridion 2011 Custom URL, which allows you to select an item URI from a SDL Tridion tree view. This tree view can come in handy to select item URIs which need to be stored in (Component or Item Metadata) Text Fields without having to know the actual item URI. The user can just open the tree view and browse to the item it wants to select and click it. 

Item Selector Custom URL eXtension uses the 2011 Core Service to access the Content Manager Server, as such this eXtension is a good showcase of how to use the 2011 Core Service and what it can do. The Item Selector only reads information from the 2011 Core Service, but update and create functionality also exists.

Installation

The Item Selector is installed as a web application under the SDL Tridion 2011 Explorer website. This means it is automatically accessed using the same user account that is logged into the SDL Tridion 2011 CMS. In the download package there is a "Release" folder which contains all the files needed to create the web application (the "Source" folder contains the entire Visual Studio solution which was used to create this).

To install the web application you need to create an "Extensions" folder under your SDL Tridion 2011 Explorer website (usually in C:\Program Files\Tridion\web). In there you can create a folder called "ItemSelector" in which you copy all the files from the "Release" folder. Then in the IIS manager interface you can convert the ItemSelector folder under Extensions into an application (right click and select Convert to Application). Then in the Add Application dialog, select the same Application Pool which is used by the SDL Tridion 2011 website (ensuring the same user credentials will be used).

convert to application    select 2011 application pool

Configuration

After installation the Item Selector has to be configured using the Web.config, in here you need to specify the URL of the SDL Tridion 2011 Explorer website so that it accesses the correct 2011 Core Service. This needs to be done under the appSettings and under the system.serviceModel\client as shown in the images below:

Web.config app settings

Web.config clients

Usage

The Custom URL can be used in a Schema by linking to the /InstalledWebLocation/ItemSelector/ItemSelectorPopup.htm file.

On this URL you can specify the following parameters to configure the Item Selector tree view:

  • start - URI indicating where the navigation tree should start (tcm:0-0-0 will show the entire tree, tcm:0-1-1 will start from Publication 1 etc.)

  • types -  the Item Type(s) which can be selected

When not specifying the start parameter and opened as a Custom URL, the publication id of the item from which the popup is opened will be used as a start value. 

Item Types which are not part of the types value will not be shown unless it is a organizational item. Use 0 to allow all Item Types to be shown and selected or combine multiple Item Types by their number, for example to select Folders and Components, use 2 + 16 = 18 (.../ItemSelectorPopup.htm?types=18). Accepted Item Types are:

  • Publication = 1
  • Folder = 2
  • StructureGroup = 4
  • Schema = 8
  • Component = 16
  • ComponentTemplate = 32
  • Page = 64
  • PageTemplate = 128
  • TargetGroup = 256
  • Category = 512
  • Keyword = 1024
  • TemplateBuildingBlock = 2048
  • VirtualFolder = 8192

REI Folder Configuration    REI Folder Configuration Metadata Schema

 


Developer
:    Bart Koopman
Company
License agreement
Tags
:    item selector,  2011,  tree view,  core service,  .NET
Version
:   1.0
Source
:   Yes

About the Author
Bart Koopman
Community Development Consultant

As a Community Development Consultant, Bart is the evangelist of all SDL Tridion products. Bart used to be a consultant and trainer at SDL Tridion, supporting both partners and customers with their implementations.

SDL WCM Solutions Division