Skip to content

Commit befd530

Browse files
authored
[BUGFIX] Fix additional data not beeing displayed anymore (#753)
1 parent 1328ed0 commit befd530

File tree

8 files changed

+587
-208
lines changed

8 files changed

+587
-208
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</dd>
3737
{% endif -%}
3838
{%- for key, option in node.additionalOptions -%}
39-
{%- if not key in ['searchFacet', 'searchKeywords'] %}
39+
{%- if not (key in ['searchFacet', 'searchKeywords']) %}
4040
<dt class="field-even">{{ key }}</dt>
4141
<dd class="field-even">{{ renderNode(option) }}
4242
</dd>

packages/typo3-docs-theme/src/Directives/SiteSetSettingsDirective.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
final class SiteSetSettingsDirective extends BaseDirective
3636
{
3737
public const NAME = 'typo3:site-set-settings';
38+
public const FACET = 'Site Setting';
3839

3940
public function __construct(
4041
private readonly LoggerInterface $logger,
@@ -254,6 +255,7 @@ public function buildConfval(array $setting, string $idPrefix, string $key, Dire
254255
if (is_array($setting['enum'] ?? false)) {
255256
$additionalFields['Enum'] = new InlineCompoundNode([new PlainTextInlineNode((string) json_encode($setting['enum'], JSON_PRETTY_PRINT))]);
256257
}
258+
$additionalFields['searchFacet'] = new InlineCompoundNode([new PlainTextInlineNode(self::FACET)]);
257259
assert(is_scalar($setting['type']));
258260

259261
$confval = new ConfvalNode(

packages/typo3-docs-theme/src/Twig/TwigExtension.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use RuntimeException;
2222
use T3Docs\GuidesPhpDomain\Nodes\PhpComponentNode;
2323
use T3Docs\GuidesPhpDomain\Nodes\PhpMemberNode;
24+
use T3Docs\Typo3DocsTheme\Directives\SiteSetSettingsDirective;
2425
use T3Docs\Typo3DocsTheme\Inventory\Typo3VersionService;
2526
use T3Docs\Typo3DocsTheme\Nodes\Metadata\EditOnGitHubNode;
2627
use T3Docs\Typo3DocsTheme\Nodes\Metadata\TemplateNode;
@@ -102,6 +103,14 @@ public function filterAllowedSearchFacets(string $value): string
102103
'ViewHelper',
103104
'TCA',
104105
'TYPO3_CONF_VAR',
106+
'YAML Form Setting',
107+
'YAML RTE Setting',
108+
'Site Language Configuration',
109+
'Site Configuration',
110+
'Console Command',
111+
'File',
112+
'Directory',
113+
SiteSetSettingsDirective::FACET,
105114
];
106115
if (!in_array(trim($value), $allowed, true)) {
107116
return 'Option';

tests/Integration/tests/confval/confval-menu-tree/expected/index.html

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
669669
<dt class="field-odd">Default</dt>
670670
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
671671
</dd>
672-
</dl>
672+
<dt class="field-even">Level</dt>
673+
<dd class="field-even">1
674+
</dd>
675+
</dl>
673676
<div class="confval-description">
674677

675678
<p>Some Text</p>
@@ -695,7 +698,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
695698
<dt class="field-odd">Default</dt>
696699
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
697700
</dd>
698-
</dl>
701+
<dt class="field-even">Level</dt>
702+
<dd class="field-even">1
703+
</dd>
704+
</dl>
699705
<div class="confval-description">
700706

701707
<p>Some Text</p>
@@ -716,7 +722,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
716722
<dt class="field-odd">Default</dt>
717723
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
718724
</dd>
719-
</dl>
725+
<dt class="field-even">Level</dt>
726+
<dd class="field-even">2
727+
</dd>
728+
</dl>
720729
<div class="confval-description">
721730

722731
<p>Some Text</p>
@@ -737,7 +746,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
737746
<dt class="field-odd">Default</dt>
738747
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
739748
</dd>
740-
</dl>
749+
<dt class="field-even">Level</dt>
750+
<dd class="field-even">3
751+
</dd>
752+
</dl>
741753
<div class="confval-description">
742754

743755
<p>Some Text</p>
@@ -762,7 +774,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
762774
<dt class="field-odd">Default</dt>
763775
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
764776
</dd>
765-
</dl>
777+
<dt class="field-even">Level</dt>
778+
<dd class="field-even">3
779+
</dd>
780+
</dl>
766781
<div class="confval-description">
767782

768783
<p>Some Text</p>
@@ -791,7 +806,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
791806
<dt class="field-odd">Default</dt>
792807
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
793808
</dd>
794-
</dl>
809+
<dt class="field-even">Level</dt>
810+
<dd class="field-even">2
811+
</dd>
812+
</dl>
795813
<div class="confval-description">
796814

797815
<p>Some Text</p>
@@ -821,7 +839,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
821839
<dt class="field-odd">Default</dt>
822840
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
823841
</dd>
824-
</dl>
842+
<dt class="field-even">Level</dt>
843+
<dd class="field-even">1
844+
</dd>
845+
</dl>
825846
<div class="confval-description">
826847

827848
<p>Some Text</p>
@@ -847,7 +868,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
847868
<dt class="field-odd">Default</dt>
848869
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
849870
</dd>
850-
</dl>
871+
<dt class="field-even">Level</dt>
872+
<dd class="field-even">1
873+
</dd>
874+
</dl>
851875
<div class="confval-description">
852876

853877
<p>Some Text</p>
@@ -873,7 +897,10 @@ <h2>Confvals<a class="headerlink" href="#confvals" data-bs-toggle="modal" data-b
873897
<dt class="field-odd">Default</dt>
874898
<dd class="field-odd"><code>&quot;Hello World&quot;</code>
875899
</dd>
876-
</dl>
900+
<dt class="field-even">Level</dt>
901+
<dd class="field-even">1
902+
</dd>
903+
</dl>
877904
<div class="confval-description">
878905

879906
<p>Some Text</p>

0 commit comments

Comments
 (0)