Documentation > Services API > ServicesOutput > MetaOutputBuilder(Asset,Asset,Boolean,Boolean,Boolean)

MetaOutputBuilder

Output method supporting fields generated by ServicesInput.ShowMetaInput, ServicesInput.ShowMetaRobotsInput. Also includes parameters for showing common crownPeak properties (id, template)

public System.String MetaOutputBuilder(Asset,Asset,Boolean,Boolean,Boolean)


Returns

HTML meta tags for each of the fields

Parameters

NameDescriptionType
asset Asset that contains fields of ServicesInput.ShowMetaInput or ServicesInput.ShowMetaRobotsInput CrownPeak.CMSAPI.Asset
siteConfig Site Configuration asset that also contains fields of ServicesInput.ShowMetaInput or ServicesInput.ShowMetaRobotsInput CrownPeak.CMSAPI.Asset
showAssetId Toggle display of current asset's Id in meta tag System.Boolean
showTemplateId Toggle display of current asset's template Id in meta tag System.Boolean
showParentAsSection Toggle display of the current asset's parent folder in the meta tag System.Boolean

Code Example

C#

Sample:

            Asset configAsset = Asset.Load("/Example Site/_Site Configuration/_Site Config");
            Out.WriteLine( ServicesOutput.MetaOutputBuilder(asset, configAsset, true, true, false) );
            

Connect with Crownpeak