Sitecore 5.0 API

ItemPath.GetPath Method 

Get item path

[Visual Basic]
Public Function GetPath( _
   ByVal from As String, _
   ByVal separator As String, _
   ByVal type As ItemPathType _
) As String
[C#]
public string GetPath(
   string from,
   string separator,
   ItemPathType type
);

Parameters

from
Base path that will not be included in the result
separator
Path separator
type
Type of the elements in the path. Can be: ID, key or name

Remarks

Builds a path of the item. If the path starts with the string specified in the from parameter, the start of the path is removed. The type parameter specifies which data is used to construct the path, e.g. item name or ID.

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.

See Also

ItemPath Class | Sitecore.Data Namespace