9

Was wondering if there are some predefined static id's in Tridion or not.

Type: "Folder" id is "2"
Type: "Structure Group" id is "4"
Type: "Categories and Keywords" id is empty?
Type: "Publication" id is "1"
etc.

Where are these id's coming from, how to get them via core services? Or they are just static?

Thanks, bvl

11

These are always the same. You can find it in the CoreService or TOM.NET API docs, when checking for ItemType Enumeration. In case you can't find it, here they are:

None 0
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
PublicationTarget 65537
TargetType 65538
TargetDestination 65540
MultimediaType 65544
User 65552
Group 65568
DirectoryService 65664
DirectoryGroupMapping 65792
Batch 66048
MultipleOperations 66048 - Obsolete
PublishTransaction 66560
WorkflowType 67584
ApprovalStatus 131073
ProcessDefinition 131074
ProcessInstance 131076
ProcessHistory 131080
ActivityDefinition 131088
ActivityInstance 131104
ActivityHistory 131136
WorkItem 131200

  • thanks! the same id numbers are valid for Tridion 2013 as well? for example Page has "id" or number 64 in Tridion 2011 and 2013 too? bvl – BVL Oct 2 '13 at 14:57
  • Yes, ItemTypes are always the same – Andrey Marchuk Oct 2 '13 at 15:09
  • A few things might break if they changed. :-) They're arrangement makes it easier to combine multiple types with a single number (as a sum). Bart Koopman uses this approach with the [Item Selector Custom URL Extension][sdltridionworld.com/community/2011_extensions/…. – Alvin Reyes Oct 2 '13 at 15:10
10

The examples you listed are for item types, not IDs.

In general, IDs will be determined by the database - whereas item types will be static as you say.

A TCM URI consists of anywhere from 2 to 4 parts separated by a dash (listed in order):

  • The ID of the Publication it belongs to. This is 0 if the item is not in a Publication (e.g. Users, Groups, Publication Targets, etc.)
  • The ID of the item itself. This is typically an auto-increasing number.
  • The item type of the item (Folder, Component, etc.) The possible values for this are fixed and will be the same for all items of that type. You can view the full list of item types by looking at the API documention for the ItemType enumeration (although add-on products occasionally introduce new ones that are not covered there). Components are the most common item type in the system and so typically do not include their item type (16) in the URI (but it's not a problem to do so).
  • (Optional) The version of the item in question. Version 0 is the currently edited / checked out version and anything else refers to a specific version of the item. If this part is left out (most of the time), the URI is version-agnostic and the latest version is implied.

"Categories and Keywords" (as well as a few other entries in the CME) is not a real item -- it is only used for grouping entries within the Content Manager Explorer. Such entries will they have a non-standard URI (but they still have one for reference, navigation, etc.).

Here are the list of Content Manager item types as of Tridion 2013:

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
PublicationTarget = 65537
TargetType = 65538
TargetDestination = 65540
MultimediaType = 65544
User = 65552
Group = 65568
DirectoryService = 65664
DirectoryGroupMapping = 65792
MultipleOperations = 66048
MultipleOperations = 66048
PublishTransaction = 66560
WorkflowType = 67584
ApprovalStatus = 131073
ProcessDefinition = 131074
ProcessInstance = 131076
ProcessHistory = 131080
ActivityDefinition = 131088
ActivityInstance = 131104
ActivityHistory = 131136
WorkItem = 131200
8

What you have mentioned are item type ids. Last part of TCM URI of an item has item type id.

For example, in tcm:493-20830-2, '2' is the item type id and the item in context is a folder.

'16' is the item type id for Components. However item type id in Component TCM URI is optional.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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