This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -124,18 +124,19 @@ The ContentListener
124
124
~~~~~~~~~~~~~~~~~~~
125
125
126
126
The ``Symfony\Cmf\Bundle\SeoBundle\EventListener\ContentListener `` looks for a
127
- content document in the request attributes. If it finds a document that is
128
- suitable for extracting metadata, the listener calls
129
- ``SeoPresentationInterface::updateSeoPage `` to populate the metadata
130
- information.
127
+ content document in the request attributes. If the listener finds a document,
128
+ it calls ``SeoPresentationInterface::updateSeoPage `` to populate the metadata
129
+ information if possible.
131
130
132
131
If the :doc: `RoutingBundle <../routing/introduction >` is installed, the default
133
132
attribute name is defined by the constant ``DynamicRouter::CONTENT_KEY ``. When
134
133
not using the RoutingBundle, you need to disable the listener or configure a
135
134
key in ``cmf_seo.content_key ``.
136
135
137
- You may also want to disable this listener when implementing your own mechanism
138
- to extract SEO information.
136
+ If you need different behavior, build your own mechanism to extract the SEO
137
+ information and disable this listener at ``cmf_seo.content_listener.enabled ``
138
+ to avoid duplicated work. Things that happen on every request are expensive in
139
+ terms of application performance.
139
140
140
141
The Twig Extension
141
142
~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments