Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

seo corrections #575

Merged
merged 4 commits into from
Sep 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 17 additions & 22 deletions bundles/seo/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,33 @@ phpcr

# app/config/config.yml
cmf_seo:
dynamic:
persistence:
phpcr:
enabled: false
manager_name: ~
persistence:
phpcr:
enabled: false
manager_name: ~

.. code-block:: xml

<!-- app/config/config.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services">
<config xmlns="http://cmf.symfony.com/schema/dic/seo">
<dynamic>
<persistence>
<phpcr
enabled="false"
manager-name="null"
/>
</persistence>
</dynamic>
<persistence>
<phpcr
enabled="false"
manager-name="null"
/>
</persistence>
</config>
</container>

.. code-block:: php

$container->loadFromExtension('cmf_seo', array(
'dynamic' => array(
'persistence' => array(
'phpcr' => array(
'enabled' => false,
'manager_name' => null,
),
'persistence' => array(
'phpcr' => array(
'enabled' => false,
'manager_name' => null,
),
),
));
Expand All @@ -72,7 +67,7 @@ translation_domain
**type**: ``string`` **default**: ``messages``

The translation domain to use when translating the title and description
template. See :ref:`bundles-seo-title-description-emplate` for more
template. See :ref:`bundles-seo-title-description-template` for more
information.


Expand All @@ -81,15 +76,15 @@ title

**type**: ``string`` **default**: ``null``

The title template, read :ref:`here <bundles-seo-title-description-emplate>`
The title template, read :ref:`here <bundles-seo-title-description-template>`
about the usage.

description
~~~~~~~~~~~

**type**: ``string`` **default**: ``null``

The description template, read :ref:`here <bundles-seo-title-description-emplate>`
The description template, read :ref:`here <bundles-seo-title-description-template>`
about the usage.

original_route_pattern
Expand Down
2 changes: 1 addition & 1 deletion bundles/seo/extractors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Available Extractors

.. note::

The interfaces life in the ``Symfony\Cmf\Bundle\SeoBundle\Extractor``
The interfaces live in the ``Symfony\Cmf\Bundle\SeoBundle\Extractor``
namespace.

An Example
Expand Down
6 changes: 3 additions & 3 deletions bundles/seo/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The only thing to do now is to use the twig helper in your templates:
</html>

This will render a page with the default title ("Page's default title") as
title element. The information definded for description and keywords will go
title element. The information defined for description and keywords will go
into the correct metatags.

.. seealso::
Expand Down Expand Up @@ -127,7 +127,7 @@ Persisting the ``SeoMetadata`` with the document makes it easy to edit for the
admin, while using the extractors are perfect to easily use values from the
displayed content.

Both ways are documented in detail in seperate sections:
Both ways are documented in detail in separate sections:

* :doc:`seo_aware`
* :doc:`extractors`
Expand Down Expand Up @@ -172,7 +172,7 @@ you want to change that to redirect instead, you can set the
),
);

.. _bundles-seo-title-description-emplate:
.. _bundles-seo-title-description-template:

Defining a Title and Description Template
-----------------------------------------
Expand Down
13 changes: 9 additions & 4 deletions bundles/seo/seo_aware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Saving the SeoMetadata in the Object
====================================

The ``SeoMetadata`` can be saved in the object, so you can persist it into the
database. This option gives admins the possiblity of changing the SEO data for
database. This option gives admins the possibility of changing the SEO data for
the document.

In order to save the ``SeoMetadata`` in the object, the object should
Expand Down Expand Up @@ -30,6 +30,11 @@ the ``SeoMetadata``::
}
}

.. tip::

If you are using PHP5.4+ you may also benefit from using the trait ``SeoAwareTrait``
to plug these behavior into your model.

Now you can set some SEO data for this ``Page`` using the metadata::

use Acme\SiteBundle\Document\Page;
Expand Down Expand Up @@ -220,7 +225,7 @@ object:
</entity>
</doctrine-mapping>
You can also choose to put the ``SeoMetadata`` class into a seperate table. To
You can also choose to put the ``SeoMetadata`` class into a separate table. To
do this, you have to enable ORM support just like you enabled PHPCR enabled
above and add a OneToOne or ManyToOne relation between the content entity and
the ``SeoMetadata`` entity.
Expand All @@ -233,15 +238,15 @@ form type can be used in forms to edit the ``SeoMetadata`` object.

.. caution::

The bundles requires the `BurgovKeyValueFormBundle`_ when using the form
The bundle requires the `BurgovKeyValueFormBundle`_ when using the form
type. Make sure you install and enable it.

Sonata Admin Integration
------------------------

Besides providing a form type, the bundle also provides a Sonata Admin
Extension. This extension adds a field for the ``SeoMetadata`` when an admin
edits an objec that implements the ``SeoAwareInterface`` in the Sonata Admin
edits an object that implements the ``SeoAwareInterface`` in the Sonata Admin
panel.

.. caution::
Expand Down