-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Reorder page from simple to advanced #3910
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
Conversation
Conflicts: book/security.rst components/property_access/introduction.rst components/stopwatch.rst cookbook/templating/namespaced_paths.rst reference/twig_reference.rst
…method in Dbal\MutableAclProvider
Conflicts: reference/dic_tags.rst
…urity-id [WCM][Security][Acl] Documentation for the new updateUserSecurityIdentity method in Dbal\MutableAclProvider
Conflicts: cookbook/form/dynamic_form_modification.rst
[Form] added multiple option to file type doc
* 2.4: use html+jinja instead of html+twig
…first being committed to 2.3" This re-introduces the delete_empty documentation to the master (2.5) branch, since it should live there. This reverts commit 72fa7b4.
the document was moved to another location
the standalone component
@@ -14,21 +14,12 @@ the status code that should be set for the given exception. | |||
Error pages can be customized in two different ways, depending on how much | |||
control you need: | |||
|
|||
1. Customize the error templates of the different error pages (explained below); | |||
1. Customize the error templates of the different error pages; | |||
|
|||
2. Replace the default exception controller ``twig.controller.exception:showAction`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should end with a full stop.
with your own controller and handle it however you want (see | ||
:ref:`exception_controller in the Twig reference <config-twig-exception-controller>`). | ||
The default exception controller is registered as a service - the actual | ||
class is ``Symfony\Bundle\TwigBundle\Controller\ExceptionController``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this re-wording (or something like this). I want to give the user as much of a step-by-step guide as possible:
If you need a little more flexibility beyond just overriding the template (e.g. you need to pass some additional variables into your template), then you can override the controller that renders the error page.
To do this, create a new controller class and make it extend Symfony's default
Symfony\Bundle\TwigBundle\Controller\ExceptionController
class. There are several methods you can override to customize different parts of how the error page is rendered.To make Symfony use your exception controller instead of the default, set the :ref:
twig.exception_controller <config-twig-exception-controller>
option inapp/config/config.yml
.
@clemens-tolboom I just added a suggestion, but I think you've made some great changes here! So, thank you very much! |
And let me know what you think about the change. If you agree and can make the update (please tweak any wording you think could be better), that would be perfect. Cheers! |
@weaverryan I think your additions are great. I really like your
as that made me puzzled for quite some time. Is it wise to add these changes through this PR? Is there a way to see the changes? I cannot render `.rst. file can I? |
I'd suggest so.
You can install Sphinx locally and build it on your machine (see Testing the Documentation). |
@xabbuh thanks ... will do both :) |
and handle it however you want. | ||
|
||
To make Symfony use your exception controller instead of the default, set the | ||
:ref:`twig.exception_controller <config-twig-exception-controller> option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the closing tick () after the closing
>`
A couple more minor notes, but I think we're good after these small items! Thanks! |
As a followup on symfony/symfony#10980 I want to propose to reorder the page as the obvious way should come first. I took me way to long to find the correct way :p I added two headers - The default ExceptionController - Override error templates in order to introduce how override works and moved the controller override to the bottom as that is more advanced.
Argh ... messed up :( |
I should have said I merged master and did a forced push to my PR ... it this still workable or should I create a new PR ? |
Could you do a rebase on the |
…-tolboom) This PR was submitted for the 2.4 branch but it was merged into the 2.3 branch instead (closes #3928). Discussion ---------- Reorder page from simple to advanced (rebased) As #3910 got meshed up here is a cherrypicked version. === As a followup on symfony/symfony#10980 I want to propose to reorder the page as the obvious way should come first. I took me way to long to find the correct way :p I added two headers - The default ExceptionController - Override error templates in order to introduce how override works and moved the controller override to the bottom as that is more advanced. Fixes #3910 Commits ------- 13f5ec6 Fixed @weaverryan: backticks and rephase method overrides. 3ad1c6c Added feedback from @weaverryan with a little move around. 10ed835 Fixed feedback from @xabbuh: Templates 67e89af Fixed feedback from @xabbuh 334492a Reorder page from simple to advanced
As a followup on symfony/symfony#10980 I want to propose to reorder the page as the obvious way should come first. I took me way to long to find the correct way :p
I added two headers
in order to introduce how override works and moved the controller override to the bottom as that is more advanced.