Documentation Center

Content item types

This section describes how the various types of content items in Content Manager relate to one another.

The following diagram shows the various items in the Content Manager:

The content items are used in several namespaces in the TOM.NET API—use the classes and methods in the TOM.NET API to navigate through the content structure and access these objects:

Tridion.ContentManager.AudienceManagement
The Tridion.ContentManager.AudienceManagement namespace contains the TargetGroup class.
Tridion.ContentManager.CommunicationManagement
The Tridion.ContentManager.CommunicationManagement namespace contains the following classes:
  • ComponentTemplate
  • Page
  • PageTemplate
  • Publication
  • StructureGroup
  • TemplateBuildingBlock
Tridion.ContentManager.ContentManagement
The Tridion.ContentManager.ContentManagement namespace contains the following classes:
  • Category
  • Component (includes Multimedia Components)
  • Folder
  • Keyword
  • Schema
  • VirtualFolder

TOM.NET example

In the following templating example, to identify which Schema is used by the first Component that resides in the root Folder of a specific Publication (identified in this sample by the unique identifier publicationURI), you would write the following templating code:

// Define a filter to return only Components.
OrganizationalItemItemsFilter filter = new OrganizationalItemItemsFilter(engine.GetSession());
filter.ItemTypes = new ItemType[] { ItemType.Component };
// Get the Publication identified by publicationURI.
Publication publication = (Publication) engine.GetSession().GetObject(publicationURI);
// Get the list of Components in the root Folder of the Publication.
IEnumerable<RepositoryLocalObject> list = publication.RootFolder.GetItems(filter);
Component component = (Component)list.First();
// Get the Schema of the first Component in that list.
Schema schema = component.Schema;

This templating code breaks down as follows:

  • engine.GetSession() returns the TOM.NET entry point
  • GetObject(publicationURI) accesses a specific Publication by URI (Universal Resource Identifier, a unique identifier for this Content Manager item)
  • RootFolder accesses the root folder of this Publication
  • GetItems(filter) gets all content items in this Folder that satisfy the filter (which has been set up to retrieve only Components).
  • list.First gets the first of these Components
  • component.Schema gets the Schema on which this Component is based

Note that the Schema you retrieve may not reside in the same Folder as the Component that uses it.