Skip to content

setMetatag(string content,null|string name,null|string property)

The setMetatag method is used to set a Metatag object that represents a metatag of a page. One of properties name or property must be provided. This method only works in integration modules.

Returned value

A returned value has a type of void.

Example

source
{{ ObjectApi.setMetatag('yes', 'mobile-web-app-capable') }}
{{ ObjectApi.setMetatag('Product', null, 'og:title') }}
output
<meta name="mobile-web-app-capable" content="yes">
<meta content="Product" property="og:title" />