Skip to content

Commit 8f01f2c

Browse files
authored
[TASK] Show information that VH allows arbitrary arguments (#658)
Resolves #657
1 parent e65211a commit 8f01f2c

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

packages/typo3-docs-theme/resources/template/body/directive/viewhelper.html.twig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,16 @@
2727
{% include "body/directive/viewhelper/viewhelper-source.html.twig" %}
2828
{% endif %}
2929

30-
{% if node.arguments %}
30+
{% if node.arguments or node.allowsArbitraryArguments %}
3131
<h2>Arguments</h2>
32+
33+
{% if node.allowsArbitraryArguments %}
34+
<div class="admonition info" role="alert">
35+
<p class="admonition-title">Allows arbitrary arguments</p>
36+
<p>This ViewHelper allows you to pass arbitrary arguments not defined below directly
37+
to the HTML tag created. This includes custom `data-` arguments.</p>
38+
</div>
39+
{% endif %}
3240
<p>The following arguments are available for the {{ node.tagName }} ViewHelper: </p>
3341
{% for argument in node.arguments %}
3442
{% include "body/directive/viewhelper/viewhelper-argument.html.twig" %}

tests/Integration/tests/viewhelper/expected/index.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ <h2>Source code</h2>
9595
</p>
9696

9797
<h2>Arguments</h2>
98-
<p>The following arguments are available for the split ViewHelper: </p>
98+
99+
<p>The following arguments are available for the split ViewHelper: </p>
99100
<dl class="confval">
100101
<dt id="viewhelper-argument-typo3fluid-fluid-viewhelpers-splitviewhelper-value" class="d-flex justify-content-between">
101102
<div class="confval-header">
@@ -233,7 +234,13 @@ <h2>Source code</h2>
233234
</p>
234235

235236
<h2>Arguments</h2>
236-
<p>The following arguments are available for the link.external ViewHelper: </p>
237+
238+
<div class="admonition info" role="alert">
239+
<p class="admonition-title">Allows arbitrary arguments</p>
240+
<p>This ViewHelper allows you to pass arbitrary arguments not defined below directly
241+
to the HTML tag created. This includes custom `data-` arguments.</p>
242+
</div>
243+
<p>The following arguments are available for the link.external ViewHelper: </p>
237244
<dl class="confval">
238245
<dt id="viewhelper-argument-typo3-cms-fluid-viewhelpers-link-externalviewhelper-uri" class="d-flex justify-content-between">
239246
<div class="confval-header">

0 commit comments

Comments
 (0)