The $page variable is always null in templates using blade components when using the frontend routing feature of Runway. However, that page states all variables from the cascade are available.
Steps to reproduce
Create a resource that uses the RunwayRoutes trait
Set the template in the Runway config to a template that uses components inside it eg:~~
I've got a fix ready which will allow you to use the $page variable, like you can with entries, however it depends on a PR in Statamic Core before it can be merged & released.
Description
The
$page
variable is alwaysnull
in templates using blade components when using the frontend routing feature of Runway. However, that page states all variables from the cascade are available.Steps to reproduce
RunwayRoutes
traitAttempt to read property "id" on null
Environment
Environment Application Name: Test Laravel Version: 11.14.0 PHP Version: 8.3.8 Composer Version: 2.7.7 Environment: local Debug Mode: ENABLED URL: local.test Maintenance Mode: OFF Timezone: UTC Locale: en
Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED
Drivers Broadcasting: log Cache: file Database: sqlite Logs: stack / single Mail: log Queue: sync Session: file
Statamic Addons: 1 Sites: 3 (Nederlands, Deutsch, English) Stache Watcher: Enabled Static Caching: Disabled Version: 5.12.0 PRO
Statamic Addons statamic-rad-pack/runway: 7.7.5