Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing view context when using blade layout components #235

Merged

Conversation

jesseleite
Copy link
Member

@jesseleite jesseleite commented Nov 4, 2022

SEO Pro's blade directive gets data from $__data, which doesn't contain our view cascade data when using blade layout components. This PR adds handling for the view cascade when context is missing.

Fixes #224.

@what-the-diff
Copy link

what-the-diff bot commented Nov 4, 2022

  • Added a check to see if the context is coming from Blade Components.
  • If it's not, we get the context from Cascade instead of using what was passed in by Statamic (which will be empty).

@jesseleite jesseleite marked this pull request as ready for review November 7, 2022 23:34
@jesseleite jesseleite merged commit 8688a7b into master Nov 7, 2022
@jesseleite jesseleite deleted the fix/missing-view-context-with-blade-layout-components branch November 7, 2022 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blade layout component: $__data context still required.
1 participant