Documentation > CMS Template API Library > Asset > BranchId

BranchId

Gets the branch id. This is initialized if the asset has been branched. It applies to assets with workflow only. If there is no branch, the asset id is returned.

Type

System.Int32

Value

The branch id.

Code Example

C#

Sample:
	Asset myAsset = Asset.Load("/PathTo/Asset");
	if(myAsset.IsLoaded)
	{
		Out.WriteLine("BranchId: " + myAsset.BranchId + "<br />");
	}

Connect with Crownpeak