Documentation > CMS Template API Library > Asset > CreatedFromModelId
CreatedFromModelId
This is the id of the model asset used to create this one. Will be -1 if no model was used. (Formerly base model Id)
Type
System.Int32
Value
The createdFrom model id.
Code Example
C#
Sample:
Asset myAsset = Asset.Load("/PathTo/Asset"); if(myAsset.IsLoaded) { if(myAsset.CreatedFromModelId > 0) { Out.WriteLine("Created using model id: " + myAsset.CreatedFromModelId); } else { Out.WriteLine("Asset was not created using a model."); } }