我有一个问题,
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "_assetic_3625095_0" as such route does not exist.") in @base_templates/base.html.twig at line 9.
我的app目录的结构:
Resources // Contains common layouts and assets for all of my apps
config // Contains common configs
current_app // yes, this is a current application directory
因此。我的Rosurces / views /目录中有一个base.html.twig,带有这样的标记:
<html>
<head>
<meta charset="UTF-8"/>
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
{% block javascripts %}
{% javascripts
'@jquery'
'@global' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>
我的current_app / Resources / views / base.html.twig继承了这个Resources / views / base.html.twig
我在开始时就遇到过这个问题。 有没有人经历过这样的问题?你有解决方案吗 ? 我知道如果我将javascripts代码块放在我的current_app / Resources / views / base.html.twig中它可以工作,但我需要在常见布局中保留常见的javascripts。而且我不想使用符号链接