Gets the path.
A path identifies an item. A path can be an ID or a sequence of item names or IDs. If a path starts with a slash (/) it is an absolute path that is resolved from the root element of the database. If not, it is a relative path that is resolved from the current context item.
The path is always an absolute path from the root element of the database.
The following example determines if an item is a layout.
{{
public bool IsLayoutItem(Item item) {
if (item != null) {
string path = item.Paths.Path;
return path.StartsWith("/sitecore/layout");
}
return false;
}
}}
ItemPath Class | Sitecore.Data Namespace