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

DOC Document breaking changes to template syntax #81

Conversation

GuySartorelli
Copy link
Member

Documents the changes in silverstripe/silverstripe-framework#10497
Based on the original documentation changes in the PRs being rescued by that PR.

Parent issue

en/04_Changelogs/5.0.0.md Show resolved Hide resolved
You may need to do a search for `$Up.Up` in your templates to resolve situations where you have worked around this - with the example above, you would need to rewrite it to `$Up.Title` (removing the second `Up`).
- Numeric, boolean and null values passed to methods in templates will now preserve their type, rather than always being cast to strings. E.g. `$Foo(true)` would previously pass a string argument `'true'` to the `Foo()` method, but will now pass an actual boolean.

You may need to check for situations where you were working around this limitation, such as checking for `$param === 'false'` if you were passing `false` into some method from a template.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You may need to check for situations where you were working around this limitation, such as checking for `$param === 'false'` if you were passing `false` into some method from a template.
You may need to check for situations where you were working around this limitation, such as checking in php code for `$param === 'false'` if you were passing `false` into some method from a template.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@GuySartorelli GuySartorelli force-pushed the pulls/5/rescue-master-template-enhancements branch from 35ac578 to 8f89d86 Compare September 13, 2022 05:33
@GuySartorelli GuySartorelli force-pushed the pulls/5/rescue-master-template-enhancements branch from 8f89d86 to 0f9ec14 Compare September 14, 2022 03:04
@emteknetnz emteknetnz merged commit ebe0e9d into silverstripe:5 Sep 15, 2022
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.

2 participants