Documentation > CMS Template API Library > Asset > GetSiteRootProperties(Int32)
GetSiteRootProperties
Get the site root configuration properties. User must have permission to view the site root.
public CrownPeak.CMSAPI.SiteRootProperties GetSiteRootProperties(Int32)
Returns
The resulting properties. Use context.Error to check for a failure
Parameters
Name | Description | Type |
---|---|---|
assetId | The id of the site root or an asset that is located within | System.Int32 |
Code Example
C#
Sample:
SiteRootProperties props = Asset.GetSiteRootProperties(asset.Id); if (!string.IsNullOrWhiteSpace(context.Error)) { // Handle error. Out.WriteLine("GetSiteRootProperties Error :" + context.Error); }