【发布时间】:2017-01-23 13:45:32
【问题描述】:
如何输出变量 target_id 而不是 node.nid?在函数调用内部?
{% set target_id = content.field_internal_lnk %}
<a href="{{ path('entity.node.canonical', {'node': node.nid }) }}">{{ content.field_button_text }}</a>
【问题讨论】:
如何输出变量 target_id 而不是 node.nid?在函数调用内部?
{% set target_id = content.field_internal_lnk %}
<a href="{{ path('entity.node.canonical', {'node': node.nid }) }}">{{ content.field_button_text }}</a>
【问题讨论】:
使用正确的变量名?
{'node': target_id }
【讨论】: