Closed zomars closed 8 years ago
Since I'm using the extension with Bolt 3.* the _metatags.twig
is no longer being picked up from the theme folder. Should it be inside a specific folder structure in the theme folder?
I've just noticed this also.
This is due to the template being loaded in the Twig namespace of @bolt
, which the theme path is very deliberately not included in.
I am presuming this is to prevent them being overridden.
@bobdenotter can you clear up what the intention is? The instructions in the README don't seem to apply anymore: https://github.com/bobdenotter/seo#configure-the-meta-tags-output
@bobdenotter Hi, the same for me.. Overwriting _metatags.twig still possible ?
I'm seeing the same behaviour on Bolt 3.0.7 with the dev-master of this extension.
I am pretty sure this is not intentional. @GawainLynch could you elaborate more about the Twig namespace? How can this be fixed? Perhaps I can work on a PR.
The behaviour isn't Bolt itself so much as the configurable options.
Basically here you could add:
# templates:
# meta: @bolt/_metatags.twig
Note that they are probably best left commented out by default, but the example keeping the system default so that if accidentally uncommented it won't break things.
Then here:
protected function getDefaultConfig()
{
return [
'templates' => [
'meta' => '@bolt/_metatags.twig',
]
];
}
Then here
$html = $this->app['render']->render($this->config['templates'['meta'], $vars);
It would be nice if I could select where to the save metatags template, instead of the theme's default root. Generally I save it into a
/partials
sub-folder.Thanks for this extension it's super useful.