mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Updated the "Template Syntax" Documentation
Added a notice to the "Variables" section of the "Template Syntax" documentation to warn developers about common template variable gotchas
This commit is contained in:
parent
a80fd433e2
commit
7c32a848aa
@ -94,6 +94,10 @@ If a variable returns a string, that string will be inserted into the template.
|
|||||||
the system will attempt to render the object through its `forTemplate()` method. If the `forTemplate()` method has not
|
the system will attempt to render the object through its `forTemplate()` method. If the `forTemplate()` method has not
|
||||||
been defined, the system will return an error.
|
been defined, the system will return an error.
|
||||||
|
|
||||||
|
[notice]
|
||||||
|
If you wish to pass parameters to getter functions, you must use the full method name, e.g. $getThing('param'). Also, parameters must be literals, and cannot be other template variables (`$getThing($variable)` will not work)
|
||||||
|
[/notice]
|
||||||
|
|
||||||
[note]
|
[note]
|
||||||
For more detail around how variables are inserted and formatted into a template see
|
For more detail around how variables are inserted and formatted into a template see
|
||||||
[Formating, Modifying and Casting Variables](casting)
|
[Formating, Modifying and Casting Variables](casting)
|
||||||
|
Loading…
Reference in New Issue
Block a user