You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
stuartcusackie
changed the title
$index not available in Blade Entry / Taxonomy tag
$index not available in Blade Collection / Taxonomy tag
Jan 22, 2025
It would be great if either $index could made available or the docs could be updated. The team has done a great job for Blade users but I still spend quite a lot of time trying to find workarounds like these. All of the old Statamic::tag('collection') examples have been removed so Blade users are kind of forced to use the new tags with insufficient documentation.
Noted on support:details. I'll add them all in future. 👍
Bug description
The documentation for both the collection tag and the taxonomy tag show a list of variables, including
$index
.I cannot figure out how to access these variables in Blade. I've dump all_defined_vars but I don't see it there. Seems like a bug.
How to reproduce
Try to access $index in either the collection tag or the taxonomy tag, e.g.:
$index undefined!
WORKAROUND:
Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: