This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ The translation domain to use when translating the title and description
70
70
template. See :ref: `bundles-seo-title-description-template ` for more
71
71
information.
72
72
73
-
74
73
``title ``
75
74
~~~~~~~~~
76
75
@@ -95,16 +94,33 @@ about the usage.
95
94
The original route strategy to use when multiple routes have the same content.
96
95
Can be one of ``canonical `` or ``redirect ``.
97
96
97
+ ``content_listener ``
98
+ ~~~~~~~~~~~~~~~~~~~~
99
+
100
+ .. versionadded :: 1.2
101
+ The ``content_listener `` configuration key was introduced in SeoBundle 1.2.
102
+
103
+ ``enabled ``
104
+ """""""""""
105
+
106
+ **type **: ``boolean `` **default **: ``true ``
107
+
108
+ Whether or not the :ref: `bundles-seo-content-listener ` should be loaded.
109
+
98
110
``content_key ``
99
- ~~~~~~~~~~~~~~~
111
+ """""""""""""""
100
112
101
113
**type **: ``string `` **default **: ``null `` (or ``DynamicRouter::CONTENT_KEY `` when RoutingBundle is enabled)
102
114
103
115
The name of the request attribute which contains the content object. This is
104
116
used by the ContentListener to extract SEO information automatically. If the
105
117
RoutingBundle is present, this defaults to ``DynamicRouter::CONTENT_KEY ``
106
118
(which evaluates to ``contentDocument ``), otherwise you must define this
107
- manually.
119
+ manually or disable the content listener.
120
+
121
+ .. versionadded :: 1.2
122
+ In versions of the SeoBundle prior to 1.2, the ``content_key `` was
123
+ configured directly in the ``cmf_seo `` root.
108
124
109
125
``sonata_admin_extension ``
110
126
~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -124,13 +124,18 @@ 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, it calls
128
- ``SeoPresentationInterface::updateSeoPage ``.
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.
129
131
130
132
If the :doc: `RoutingBundle <../routing/introduction >` is installed, the default
131
133
attribute name is defined by the constant ``DynamicRouter::CONTENT_KEY ``. When
132
- not using the RoutingBundle, you need to configure a key in
133
- ``cmf_seo.content_key ``.
134
+ not using the RoutingBundle, you need to disable the listener or configure a
135
+ key in ``cmf_seo.content_key ``.
136
+
137
+ You may also want to disable this listener when implementing your own mechanism
138
+ to extract SEO information.
134
139
135
140
Extracting Metadata
136
141
~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments