Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit ed50e9c

Browse files
committed
fix(twig): Use underscore instead of dot for global variables
1 parent 561a042 commit ed50e9c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

config/packages/twig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
->global('umami_domain', env('UMAMI_DOMAIN'))
1515
->global('umami_website_id', env('UMAMI_WEBSITE_ID'))
1616
->strictVariables(true)
17-
->global('appfeatures.hint', param('app.features.hint'))
18-
->global('appfeatures.comment', param('app.features.comment'));
17+
->global('app_features_hint', param('app.features.hint'))
18+
->global('app_features_comment', param('app.features.comment'));
1919
};

templates/components/Challenge/Comments.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<div {{ attributes.defaults({class: 'app-challenge-comments', 'aria-hidden': not appfeatures.comment}) }}>
2-
{% if appfeatures.comment %}
1+
<div {{ attributes.defaults({class: 'app-challenge-comments', 'aria-hidden': not app_features_comment}) }}>
2+
{% if app_features_comment %}
33
<div class="app-challenge-comments__new mb-4">
44
<twig:Challenge:Comments:CommentForm :question="question" :commenter="currentUser" />
55
</div>

templates/components/Challenge/Ui.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{% if question.solutionVideo %}
44
<twig:Challenge:SolutionVideoModal class="challenge-solution-video-modal" :question="question" :user="user" />
55
{% endif %}
6-
{% if appfeatures.hint %}
6+
{% if app_features_hint %}
77
<twig:Challenge:Instruction:Modal class="challenge-instruction-modal" :question="question" :currentUser="user" />
88
{% endif %}
99

@@ -15,7 +15,7 @@
1515
<twig:Challenge:Executor class="mt-2" :question="question" :user="user">
1616
<twig:block name="actions">
1717
<div class="btn-group">
18-
{% if appfeatures.hint %}
18+
{% if app_features_hint %}
1919
<button type="button" class="btn btn-outline-secondary" data-bs-toggle="modal" data-bs-target=".challenge-instruction-modal">提示</button>
2020
{% endif %}
2121
{% if question.solutionVideo %}
@@ -35,7 +35,7 @@
3535
</div>
3636
</section>
3737

38-
{% if appfeatures.comment %}
38+
{% if app_features_comment %}
3939
<section class="app-challenge-primary__comments mt-4" id="comments">
4040
<h3 class="mb-3">留言區</h3>
4141
<twig:Challenge:Comments :question="question" :currentUser="user" loading="lazy" />

templates/components/Navbar.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
name: '留言一覽',
2121
icon: 'bi bi-chat-left-text-fill',
2222
path: path('app_comments'),
23-
disabled: not appfeatures.comment,
23+
disabled: not app_features_comment,
2424
},
2525
{
2626
pageId: 'complementary',

0 commit comments

Comments
 (0)