Create a meta tag that is output inline:
$this->Html->meta('icon', 'favicon.ico');
Append the meta tag to custom view block "meta":
$this->Html->meta('description', 'A great page', ['block' => true]);
Append the meta tag to custom view block:
$this->Html->meta('description', 'A great page', ['block' => 'metaTags']);
Create a custom meta tag:
$this->Html->meta(['property' => 'og:site_name', 'content' => 'CakePHP']);
### Options
- block` - Set to true to append output to view block "meta" or provide
custom block name.
public meta ( string | array $type, string | array | null $content = null, array $options = [] ) : string | ||
$type | string | array | The title of the external resource |
$content | string | array | null | The address of the external resource or string for content attribute |
$options | array | Other attributes for the generated tag. If the type attribute is html, rss, atom, or icon, the mime-type is returned. |
return | string | A completed `` element. |