Sitecore 5.0 API

ItemPath.MediaPath Property

Gets the media path.

[Visual Basic]
Public ReadOnly Property MediaPath As String
[C#]
public string MediaPath {get;}

Remarks

If the item is a descendant of /sitecore/media library the path relative to /sitecore/media library is returned with a slash '/' prepended. If not, the absolute path is returned.

Example

Item item = Sitecore.Context.Database.Items["/sitecore/media library/Buildings/House"]; string s = item.Paths.Path; // /Buildings/House

See Also

ItemPath Class | Sitecore.Data Namespace