语境
我正在尝试覆盖以下模板:vendor/oro/platform/src/Oro/Bundle/OrganizationBundle/Resources/views/BusinessUnit/update.html.twig
这个模板似乎属于OroOrganizationBundle
捆绑包。
问题
因此,我试图将我的覆盖放在以下路径中:templates/bundles/OroOrganizationBundle/BusinessUnit/update.html.twig
根据 Symfony 4.X 文档:https ://symfony.com/doc/4.4/bundles/override.html#templates
我已清除缓存:symfony console cache:clear
但没有任何变化。
这是我的覆盖模板:
{% extends 'OroOrganizationBundle:BusinessUnit:update.html.twig' %}
{% block content_data %}
{% set id = 'business_unit-profile' %}
{% set dataBlocks = [{
'title': 'General'|trans,
'class': 'active',
'subblocks': [{
'title': '',
'data': [
form_widget(form.appendUsers, {'id': 'businessUnitAppendUsers'}),
form_widget(form.removeUsers, {'id': 'businessUnitRemoveUsers'}),
form_row(form.name),
form_row(form.parentBusinessUnit),
form_row(form.phone),
form_row(form.website),
form_row(form.email),
form_row(form.fax),
]
}]
}] %}
{% set dataBlocks = dataBlocks|merge(oro_form_additional_data(form, 'Additional Override'|trans)) %}
{% set dataBlocks = dataBlocks|merge([{
'title' : 'oro.organization.businessunit.users.label'|trans,
'subblocks': [{
'title' : null,
'useSpan': false,
'data' : [dataGrid.renderGrid(gridName, {business_unit_id: entityId}, { cssClass: 'inner-grid' })]
}]
}] ) %}
{% set data = {
'formErrors': form_errors(form)? form_errors(form) : null,
'dataBlocks': dataBlocks
} %}
{{ parent() }}
{% endblock content_data %}
这是以下命令行的输出:symfony console debug:twig | grep Organization