- Issue created by @michael.barlow@mirumagency.com
- last update
about 1 year ago 48 pass, 22 fail - @michaelbarlowmirumagencycom opened merge request.
- last update
about 1 year ago 48 pass, 22 fail - @michaelbarlowmirumagencycom opened merge request.
Use hook_metatag_tags_alter() and set tree_depth to zero like in the example
function hook_metatag_tags_alter(array &$definitions) {
// Set up the Schema Article tags to only display "NewsArticle" in the
// `@type` option list.
$definitions['schema_article_type']['property_type'] = 'type';
$definitions['schema_article_type']['tree_parent'] = ['NewsArticle'];
$definitions['schema_article_type']['tree_depth'] = 0;
}
All subitems will be returned instead of just NewsArticle
I believe that src/Plugin/metatag/Tag/SchemaNameBase.php should not check for empty for the tree_depth since it's an int and check for isset instead.
Active
2.0
Code