Skip to content

Conversation

clemens-tolboom
Copy link
Contributor

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.

wouterj and others added 30 commits November 2, 2013 11:35
Conflicts:	book/security.rst	components/property_access/introduction.rst	components/stopwatch.rst	cookbook/templating/namespaced_paths.rst	reference/twig_reference.rst
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.
Copy link
Member

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.

Copy link
Member

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 in app/config/config.yml.

@weaverryan
Copy link
Member

@clemens-tolboom I just added a suggestion, but I think you've made some great changes here! So, thank you very much!

@weaverryan
Copy link
Member

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!

@clemens-tolboom
Copy link
Contributor Author

@weaverryan I think your additions are great. I really like your

To make Symfony use your exception controller instead of the default, set the :ref:twig.exception_controller option in app/config/config.yml.

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?

@xabbuh
Copy link
Member

xabbuh commented Jun 7, 2014

Is it wise to add these changes through this PR?

I'd suggest so.

Is there a way to see the changes? I cannot render `.rst. file can I?

You can install Sphinx locally and build it on your machine (see Testing the Documentation).

@clemens-tolboom
Copy link
Contributor Author

@xabbuh thanks ... will do both :)

Copy link
Member

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 >`

@weaverryan
Copy link
Member

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.
@clemens-tolboom
Copy link
Contributor Author

Argh ... messed up :(

@clemens-tolboom
Copy link
Contributor Author

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 ?

@xabbuh
Copy link
Member

xabbuh commented Jun 10, 2014

Could you do a rebase on the 2.4 branch?

@clemens-tolboom
Copy link
Contributor Author

I've created a new PR #3928 as I did not manage to get the rebased version push to this PR :(

So please checkout #3928

weaverryan added a commit that referenced this pull request Jun 11, 2014
…-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment