@@ -122,6 +122,101 @@ manually or disable the content listener.
122
122
In versions of the SeoBundle prior to 1.2, the ``content_key `` was
123
123
configured directly in the ``cmf_seo `` root.
124
124
125
+ ``sitemap ``
126
+ ~~~~~~~~~~~
127
+
128
+ .. versionadded :: 1.2
129
+ Support for sitemaps was introduced in version 1.2 of the SeoBundle.
130
+
131
+ .. configuration-block ::
132
+
133
+ .. code-block :: yaml
134
+
135
+ # app/config/config.yml
136
+ cmf_seo :
137
+ sitemap :
138
+ enabled : true
139
+ defaults :
140
+ default_change_frequency : always
141
+ templates :
142
+ html : CmfSeoBundle:Sitemap:index.html.twig
143
+ xml : CmfSeoBundle:Sitemap:index.xml.twig
144
+ configurations :
145
+ sitemap : ~
146
+
147
+ .. code-block :: xml
148
+
149
+ <!-- app/config/config.xml -->
150
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
151
+ <container xmlns =" http://symfony.com/schema/dic/services" >
152
+
153
+ <config xmlns =" http://example.org/schema/dic/cmf_seo" >
154
+ <sitemap enabled =" true" >
155
+ <defaults >
156
+ <template format =" html" >CmfSeoBundle:Sitemap:index.html.twig</template >
157
+ <template format =" xml" >CmfSeoBundle:Sitemap:index.xml.twig</template >
158
+ </defaults >
159
+ <configuration name =" sitemap" />
160
+ </sitemap >
161
+ </config >
162
+ </container >
163
+
164
+ .. code-block :: php
165
+
166
+ // app/config/config.php
167
+ $container->loadFromExtension('cmf_seo', array(
168
+ 'sitemap' => array(
169
+ 'enabled' => true,
170
+ 'defaults' => array(
171
+ 'templates' => array(
172
+ 'html' => 'CmfSeoBundle:Sitemap:index.html.twig',
173
+ 'xml' => 'CmfSeoBundle:Sitemap:index.xml.twig',
174
+ ),
175
+ ),
176
+ 'configurations' => array(
177
+ 'sitemap' => null,
178
+ ),
179
+ ),
180
+ ));
181
+
182
+ ``enabled ``
183
+ """""""""""
184
+
185
+ **type **: ``boolean `` **default **: ``false ``
186
+
187
+ Whether or not the :doc: `sitemap ` should be loaded. As soon as you configure
188
+ anything else in the ``sitemap `` section, this defaults to true.
189
+
190
+ ``defaults ``
191
+ """"""""""""
192
+
193
+ Contains default configuration that applies to all sitemaps.
194
+
195
+ ``configurations ``
196
+ """"""""""""""""""
197
+
198
+ Contains the list of sitemaps that should exist. Each sitemap can overwrite
199
+ default configuration. If not specified, a sitemap called "sitemap" exists.
200
+
201
+ ``default_change_frequency ``
202
+ ****************************
203
+
204
+ **type **: ``enum `` **default **: ``always `` **allowed values **: 'always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never'
205
+
206
+ Specify the change frequency for UrlInformation that do not have one explicitly
207
+ set.
208
+
209
+ ``templates ``
210
+ *************
211
+
212
+ **type **: ``hashmap `` **default **: templates for html and xml
213
+
214
+ This hashmap specifies which template to use for the sitemap in each format.
215
+ By default, you have:
216
+
217
+ * html: CmfSeoBundle:Sitemap: index.html.twig
218
+ * xml: CmfSeoBundle:Sitemap: index.xml.twig
219
+
125
220
``sonata_admin_extension ``
126
221
~~~~~~~~~~~~~~~~~~~~~~~~~~
127
222
0 commit comments