mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update 03_Form_Templates.md - form template locations (#8751)
Update guidance on form template location. They don't necessarily have to be placed in /app/templates and will work in the theme directory too. The current text also seems to suggest that they can be placed in the core directory - something which I don't believe should be advised,
This commit is contained in:
parent
072e99e369
commit
17b55fea5e
@ -16,7 +16,7 @@ $field = new TextField(..);
|
||||
$field->setTemplate('MyCustomTextField');
|
||||
```
|
||||
|
||||
Both `MyCustomTemplate.ss` and `MyCustomTextField.ss` should be located in **app/templates/** or the same directory as the core.
|
||||
To override the template for CMS forms, the custom templates should be located in **/app/templates**. Front-end form templates can be located in **/app/templates** or in the active theme's **/templates** directory.
|
||||
|
||||
<div class="notice" markdown="1">
|
||||
It's recommended to copy the contents of the template you're going to replace and use that as a start. For instance, if
|
||||
|
Loading…
Reference in New Issue
Block a user