@@ -16,8 +16,9 @@ this on the error page.
16
16
Using the Exception Controller
17
17
------------------------------
18
18
19
- To use the exception controller provided by this bundle, configure the twig
20
- bundle:
19
+ When you want to add suggestions to the error pages, register the
20
+ ``SuggestionProviderController `` provided by this bundle as the exception
21
+ controller:
21
22
22
23
.. configuration-block ::
23
24
@@ -49,14 +50,20 @@ bundle:
49
50
'exception_controller' => 'cmf_seo.error.suggestion_provider.controller:showAction',
50
51
));
51
52
53
+ .. seealso ::
54
+
55
+ You can read more about exception controllers in the `Symfony documentation `_.
56
+
52
57
After this, you need to enable some suggestion providers. Suggestion providers
53
58
provide relevant other pages, which are displayed on the error page. The bundle
54
59
comes with two built-in providers:
55
60
56
61
``ParentSuggestionProvider ``
57
- This provides the parent page of the not found page.
62
+ This provides the parent page of the not found page (e.g. ``/blog `` when
63
+ ``/blog/foo `` resulted in a 404 page).
58
64
``SiblingSuggestionProvider ``
59
- This provides the siblings of the current page.
65
+ This provides the siblings of the current page (e.g. ``/blog/something ``
66
+ when ``/blog/foo `` resulted in a 404 page).
60
67
61
68
.. note ::
62
69
@@ -177,3 +184,5 @@ Now, register this new class as a service and tag it as
177
184
$container->setDefinition('app.suggestions.homepage', $definition);
178
185
179
186
The tag allows a ``group `` attribute, in order to group suggested links.
187
+
188
+ .. _Symfony Documentation : http://symfony.com/doc/current/cookbook/controller/error_pages.html#overriding-the-default-exceptioncontroller
0 commit comments