我安装了最新的(1.0.0-dev)Sylius和最新的LTS Symfony(2.8.9),并且我试图了解如何覆盖所有tepmplates。我发现这个人https://www.youtube.com/watch?v=FbujTxpd3WY,但这似乎已经过时了。
为了理解它,我想将<title>
Sylius更改为其他内容。
AppBundle.php
<?php
namespace AppBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AppBundle extends Bundle
{
public function getParent()
{
return 'SyliusShopBundle';
}
}
文件夹
layout.html.twig(覆盖)
<title>MYNEWTITLE</title>
但即使php app/console cache:clear
它没有改变。谁能指出我最近的教程,或看看我错了吗?
我们不建议为此目的使用Bundle的继承,请使用app/Resources
文件夹覆盖或主题化。
在这里看看:http : //docs.sylius.org/en/latest/customization/template.html
对于主题,请在此处:http : //docs.sylius.org/en/latest/bundles/SyliusThemeBundle/index.html
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句