Gets the Item with the specified URI.
An item is a record in a database. Items are the basic building block of a Sitecore site. An item may represent any kind of information, e.g. a piece of content, a media file, a layout etc. Items always have a name and and ID that uniquely identifies the item within the database. Items have a template that defines which fields the item contains. An item represent a single version of piece of content is a single language.
This example gets an item in a database.
public Item GetItem(string databaseName, string id, string language, string version) {
ID itemID = ID.Parse(id);
Language itemLanguage = Language.Parse(language);
Sitecore.Data.Version itemVersion = Sitecore.Data.Version.Parse(version);
Database database = Factory.GetDatabase(databaseName);
if (database != null) {
return database.Items[itemID, itemLanguage, itemVersion];
}
return null;
}
ItemRecords Class | Sitecore.Data Namespace | ItemRecords.Item Overload List