Docs about stopping the Cascade
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- php
調査の方向性
Read the Data Inheritance page and the linked Partial tag documentation about passing data. Check how the issue’s view:class example fits the Cascade behavior, then document the recommended approach if confirmed. Done means the docs explain how to prevent a nested partial from inheriting a parent’s class value.
索引モデルが issue の本文から書いたものです。
説明
Often partials use a param called class and are nested. In that case, I don't want to use the parent class data in a nested partial that doesn't receive class itself:
{{# The parent partial receives a class. #}}
{{ partial:parent class="some-class" }}
{{#
@name Parent
@param class Custom CSS classes.
#}}
{{# No class passed to the child. #}}
<div :$class>
{{ partial:child }}
</div>
{{#
@name Child
@param class Custom CSS classes.
#}}
{{# Since class is null, the Cascade would look upwards until it finds class data. #}}
<div :$class>
I am a child.
</div>
My solution here was to use view:class. The nested partial doesn't receive the parent's class data anymore. I don't know if this is the intended use case (besides that).
I would either add this as a "best practice" (like in the linked docs article) to the Data Inheritance docs page or another solution that might be better.
- 主要言語
- PHP
- スター
- 133
- フォーク
- 405
- 平均マージ
- 21時間 45分
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
statamic/docs のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Chunked Uploadsオープン
難易度 1/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Installation / Deployment Guides
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 40/100
メンテナーはふだん 1 日以内に返信
-
Document how conditions treat empty and null values対応中かも @joshdaugherty が 12 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
glpi-project/glpi#25922 ·
メンテナーはふだん 1 日以内に返信
-
Translation TwigBridge
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
symfony/symfony-docs#23308 ·
メンテナーはふだん 3 日以内に返信
-
sync-en
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 4 日以内に返信
-
Перевод устарел
難易度 1/5 1時間未満 初心者へのやさしさ 88/100