Drupal 更改table.html.twig中的链接
我和Drupal8一起工作。我启用调试并找到Drupal 更改table.html.twig中的链接,drupal,Drupal,我和Drupal8一起工作。我启用调试并找到[ ]然后覆盖主题文件夹中的table.html.twig。现在,标签包含一个我想添加[/edit]到其中的链接。使用户导航到编辑页面。以下代码来自核心文件 <tbody> {% for row in rows %} <tr{{ row.attributes }}> {% for cell in row.cells %} <{{ cell.ta
[
]
然后覆盖主题文件夹中的table.html.twig。现在,标签包含一个我想添加[/edit]到其中的链接。使用户导航到编辑页面。以下代码来自核心文件
<tbody>
{% for row in rows %}
<tr{{ row.attributes }}>
{% for cell in row.cells %}
<{{ cell.tag }}{{ cell.attributes }}>
{{- cell.content -}}
</{{ cell.tag }}>
{% endfor %}
</tr>
{% endfor %}
</tbody>
但是我不知道如何访问[cell.content]来添加[/edit]
表是如何生成的?这是密码。桌子放在哪里?在https://example.com/ar/webform/companies_form/submissions/
编辑web表单页面的路径是什么webform/companys\u form/submissions/3119/edit
您是否调试了模板以查看模板中有哪些可用变量?对
Array
(
[0] => header
[1] => rows
[2] => attributes
[3] => sticky
[4] => responsive
[5] => empty
[6] => footer
[7] => caption
[8] => colgroups
[9] => theme_hook_original
[10] => title_attributes
[11] => content_attributes
[12] => title_prefix
[13] => title_suffix
[14] => db_is_active
[15] => is_admin
[16] => logged_in
[17] => user
[18] => directory
[19] => header_columns
[20] => no_striping
[21] => #cache
)
你已经试过什么了?表是如何生成的?桌子放在哪里?“编辑网页表单”的路径是什么?您是否调试了模板以查看模板中有哪些可用变量?如果您希望得到一个好的答案,您需要在问题中添加更多的细节。@2pha请检查我更新的问题。您似乎在谈论一个webform提交表(由webform模块中的视图生成),您可能只需编辑该视图(而不是覆盖模板等)。虽然我认为视图已经为每个提交提供了一个编辑链接。@2pha我检查了视图。但我没有找到webform提交表的视图
Array
(
[0] => header
[1] => rows
[2] => attributes
[3] => sticky
[4] => responsive
[5] => empty
[6] => footer
[7] => caption
[8] => colgroups
[9] => theme_hook_original
[10] => title_attributes
[11] => content_attributes
[12] => title_prefix
[13] => title_suffix
[14] => db_is_active
[15] => is_admin
[16] => logged_in
[17] => user
[18] => directory
[19] => header_columns
[20] => no_striping
[21] => #cache
)