-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #244 Allow to easily customize/override any backend element (…
…javiereguiluz) This PR was merged into the master branch. Discussion ---------- Allow to easily customize/override any backend element I've created this PR as an early preview of the mechanism that it will soon allow to configure/customize/override each backend element. Some comments: * This already works for the main backend templates (layout, edit, new, list, etc.) * Tomorrow I'll add the templates to customize form fields and the rest of stuff. * In #238 I proposed a super simple override mechanism base on the `include()` Twig function. Sadly, that doesn't work because when you include a template, you are **not** including its blocks. This means that blocks are not defined in the parent template and nothing works as expected. This is a well-known Twig limitation that is not going to be fixed. * Instead of the previous mechanism, now we determine the template to use for each backend element and entity. We do this when the container is built, so we'll get a nice performance boost (the override mechanism will be run only once instead of executing it for every request). Commits ------- 3fd7765 Minor tweaks for Twig blocks f80196a Added new blocks in the show.html.twig template ee89078 The Twig extension no longer needs the @router services because it doesn't generate any URL cc3ba6a Templates (and text files in general) should end with a new line character 2cd5e38 Minor fix in a comment 5f83b4f Type hinted variables with interfaces instead of concrete implementations 572c607 Improved the return type of a method description b5456de Added a lot of blocks in the list.html.twig template f1240c9 Added blocks in edit, form and new templates 4d5736e Moved the default/form/entity_form.html.twig template to default/form.html.twig d31ed39 Defined a lot of blocks for the layout.html.twig template 747ae8a Removed an unreachable code 7d425e9 Fiexd an error in the image field type 3c35aca Removed an unused variable 697f365 Fixed test for the previous change 9de4a74 Group options by purpose not alphabetically e99b291 Added new tests c0d8795 Improved the documentation about the custom templates 79b3fa8 Allowed entities to define their own custom templates 9a7ad1d Fixed one comment 3279aa8 Improve one test be9979b Add support for customizing the fragments used to render each field type 3e48bf9 Merge branch 'master' into fix_238 46865a9 The main backend templates can now be easily overridden 5f0e755 Removed the unused _flashes.html.twig template 7584d3b Renamed _list_paginator.html.twig template to _paginator.html.twig
- Loading branch information
Showing
148 changed files
with
4,810 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.