@@ -16,7 +16,8 @@ for the same content if you need that.
16
16
There are two solutions to avoid penalties
17
17
with search engines:
18
18
19
- - Create a canonical link that identifies the original URL: ``<link rel="canonical" href="/route/org/content"> ``
19
+ - Create a canonical link that identifies the
20
+ original URL: ``<link rel="canonical" href="/route/org/content"> ``
20
21
21
22
- Redirect to THE original url.
22
23
@@ -123,31 +124,34 @@ called `SeoMetada`:
123
124
.. code-block :: php
124
125
125
126
/**
126
- * This string contains the information where we will find the original content.
127
- * Depending on the setting for the cmf_seo.content.pattern, we will do an redirect to this url or
127
+ * This string contains the information where we will find the
128
+ * original content. Depending on the setting for the
129
+ * cmf_seo.content.pattern, we will do an redirect to this url or
128
130
* create a canonical link with this value as the href attribute.
129
131
*
130
132
* @var string
131
133
*/
132
134
private $originalUrl;
133
135
134
136
/**
135
- * If this string is set, it will be inserted as a meta tag for the page description.
137
+ * If this string is set, it will be inserted as a meta
138
+ * tag for the page description.
136
139
*
137
140
* @var string
138
141
*/
139
142
private $metaDescription;
140
143
141
144
/**
142
- * This comma separated list will contain the Keywords for the page's meta information.
145
+ * This comma separated list will contain the Keywords for
146
+ * the page's meta information.
143
147
*
144
148
* @var string
145
149
*/
146
150
private $metaKeywords;
147
151
148
152
A object should implement
149
- the `SeoAwareInterface `, which simply forced to implement setter/getter for the
150
- seo metadata. A simple example would be:
153
+ the `SeoAwareInterface `, which simply forced to implement
154
+ setter/getter for the seo metadata. A simple example would be:
151
155
152
156
.. code-block :: php
153
157
@@ -189,11 +193,13 @@ seo metadata. A simple example would be:
189
193
$manager->persist($route);
190
194
$manager->flush();
191
195
192
- Visiting the site with the url ``/seo-content `` (same template shown above) will
193
- show a Page with "Documents own tile" as title, "This ist the text for the description
194
- meta tag" in the description, "Seo, Content" in the keywords and a canonical link with
195
- ``href="/original/url/of/content" ``. But what about some default string to just concatenate
196
- defaults and documents own values? Just add some more configs to the cmf_seo configuration
196
+ Visiting the site with the url ``/seo-content `` (same template
197
+ shown above) will show a Page with "Documents own tile" as
198
+ title, "This ist the text for the description meta tag" in
199
+ the description, "Seo, Content" in the keywords and a canonical
200
+ link with ``href="/original/url/of/content" ``. But what about
201
+ some default string to just concatenate defaults and documents
202
+ own values? Just add some more configs to the cmf_seo configuration
197
203
section.
198
204
199
205
.. configuration-block ::
@@ -240,9 +246,11 @@ section.
240
246
),
241
247
);
242
248
243
- As you will notice, you got the opportunity to set Symfony translation key for your
244
- default values for title and description. So you will got Multi-Language-Support
245
- out of the box. Just define your values for default title/description as translations:
249
+ As you will notice, you got the opportunity to set Symfony
250
+ translation key for your default values for title and
251
+ description. So you will got Multi-Language-Support
252
+ out of the box. Just define your values for default
253
+ title/description as translations:
246
254
247
255
.. code-block :: xml
248
256
@@ -263,16 +271,18 @@ out of the box. Just define your values for default title/description as transla
263
271
</file >
264
272
</xliff >
265
273
266
- If you want to concatenate your documents values with the default ones you need them as
267
- parameters in you translation target.
274
+ If you want to concatenate your documents values with the
275
+ default ones you need them as parameters in you translation
276
+ target.
268
277
269
278
.. tip ::
270
279
271
- If you does not what to open a translation file for two entry, just set
272
- ``Default title | %%content_title%%``or ``Default description. %%content_description%% ``.
280
+ If you does not what to open a translation file for two entry,
281
+ just set ``Default title | %%content_title%%``or ``Default
282
+ description. %%content_description%% ``.
273
283
274
- For changing the default translation domain (messages), the SeoBundle provides a configuration
275
- value:
284
+ For changing the default translation domain (messages), the SeoBundle
285
+ provides a configuration value:
276
286
277
287
.. configuration-block ::
278
288
@@ -301,7 +311,8 @@ value:
301
311
),
302
312
);
303
313
304
- For redirects instead of canonical links (default) set the following option:
314
+ For redirects instead of canonical links (default) set the following
315
+ option:
305
316
306
317
.. configuration-block ::
307
318
@@ -330,10 +341,11 @@ For redirects instead of canonical links (default) set the following option:
330
341
),
331
342
);
332
343
333
- This value will cause a redirect to the url persisted in the `` originalUrl `` property of the
334
- ``SeoMetadata ``.
344
+ This value will cause a redirect to the url persisted in the
345
+ ``originalUrl `` property of the `` SeoMetadata ``.
335
346
336
- The SeoMetadata contains a form type for your Symfony Form. Just create you form with the following key:
347
+ The SeoMetadata contains a form type for your Symfony Form.
348
+ Just create you form with the following key:
337
349
338
350
.. code-block :: php
339
351
@@ -343,8 +355,8 @@ The SeoMetadata contains a form type for your Symfony Form. Just create you form
343
355
...
344
356
;
345
357
346
- For SonataAdminBundle user the SeoBundle provides an admin extension to add that form to your
347
- form configuration.
358
+ For SonataAdminBundle user the SeoBundle provides an admin extension
359
+ to add that form to your form configuration.
348
360
349
361
Using extractors for getting your documents seo metadata
350
362
--------------------------------------------------------
@@ -373,8 +385,10 @@ value. It is up to the developer how to implement that extraction methods.
373
385
| | |extractor will use this |
374
386
+--------------------------+------------------------+-----------------------------------------------+
375
387
376
- For customizing the extraction process you have got the opportunity to create your own extractor.
377
- Just by implementing the ``SeoExtractorInterface `` and tagging the service as ``cmf_seo.extractor ``
388
+ For customizing the extraction process you have got the opportunity
389
+ to create your own extractor. Just by implementing the
390
+ ``SeoExtractorInterface `` and tagging the service as
391
+ ``cmf_seo.extractor ``
378
392
379
393
.. code-block :: xml
380
394
@@ -398,5 +412,5 @@ Just by implementing the ``SeoExtractorInterface`` and tagging the service as ``
398
412
399
413
.. _`with composer` : http://getcomposer.org
400
414
.. _`packagist` : https://packagist.org/packages/symfony-cmf/menu-bundle
401
- .. _`with github` : git clone https://github.com/symfony-cmf/SeoContentBundle version path/to/
415
+ .. _`with github` : git clone https://github.com/symfony-cmf/SeoContentBundle
402
416
.. _`sonata seo documentation` : http://sonata-project.org/bundles/seo/master/doc/index.html
0 commit comments