Explain that Blade fluent tags don't have context

Offen
#1,573 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
49/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
laravel, php
Bereich
documentation

Rechercherichtung

Update the Blade tags page and consider the tag pages that retrieve values from context; the issue does not name specific files. Start by locating those documentation pages and reviewing the linked Statamic CMS discussion for the context requirements. Done when the Blade fluent tags documentation explains that some tags need context passed explicitly and the affected tag pages describe what Blade users must provide.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Regarding conversation here: https://github.com/statamic/cms/issues/11247

Blade fluent tags don't automatically get the context, and some tags rely on the context.

For example, the locales tag needs to know the ID. In Antlers it can just grab the nearest id from the available variables, but since Blade is just PHP, it's not as magical so you need to pass it in.

On the Blade tags page we should mention that context might be necessary on some tags. And, on those tag pages we could consider explaining whenever things are retrieved from context and note what's needed to be done when using Blade fluent tags.

Vorherrschende Sprache
PHP
Sterne
133
Forks
405
Ø Merge
1 T. 16 Std.
Gemergte PRs (30 T.)
13

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus statamic/docs

Alle Issues in statamic/docs

Ähnliche Issues

Weitere Issues zu PHP

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.