Documentation > CMS Template API Library > AssetPath
CrownPeak.CMSAPI.AssetPath
Represents the path to an in the CMS.
| Name | Description | Type | 
|---|---|---|
| Count | The number of path segments. | Property | 
| Item[Int32] | Allows the user to access the pieces of the path like it were an array of strings. | Property | 
Code Example
C#
Sample:
Asset asset = Asset.Load("/Site/Folder/Asset");
Out.WriteLine(asset.AssetPath[0]);
// prints "Site"
Out.WriteLine(asset.AssetPath[1]);
// prints "Folder"
// print each segment
foreach(string segment in asset.AssetPath)
{
  Out.WriteLine(segment);
}
