From 4176f197ac94e2beffea2920b8f18370ba20ff9f Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Wed, 24 Sep 2014 00:29:15 -0500 Subject: [PATCH 1/4] bootstrap changes --- bundles/seo/configuration.rst | 39 +++++++++++++++-------------------- bundles/seo/introduction.rst | 6 +++--- bundles/seo/seo_aware.rst | 2 +- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/bundles/seo/configuration.rst b/bundles/seo/configuration.rst index fe2da9c7..ae1e3ef6 100644 --- a/bundles/seo/configuration.rst +++ b/bundles/seo/configuration.rst @@ -20,11 +20,10 @@ phpcr # app/config/config.yml cmf_seo: - dynamic: - persistence: - phpcr: - enabled: false - manager_name: ~ + persistence: + phpcr: + enabled: false + manager_name: ~ .. code-block:: xml @@ -32,26 +31,22 @@ phpcr - - - - - + + + .. 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, ), ), )); @@ -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. @@ -81,7 +76,7 @@ title **type**: ``string`` **default**: ``null`` -The title template, read :ref:`here ` +The title template, read :ref:`here ` about the usage. description @@ -89,7 +84,7 @@ description **type**: ``string`` **default**: ``null`` -The description template, read :ref:`here ` +The description template, read :ref:`here ` about the usage. original_route_pattern diff --git a/bundles/seo/introduction.rst b/bundles/seo/introduction.rst index ae61706e..9de7c456 100644 --- a/bundles/seo/introduction.rst +++ b/bundles/seo/introduction.rst @@ -81,7 +81,7 @@ The only thing to do now is to use the twig helper in your templates: 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:: @@ -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` @@ -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 ----------------------------------------- diff --git a/bundles/seo/seo_aware.rst b/bundles/seo/seo_aware.rst index ed81031c..8a89b81c 100644 --- a/bundles/seo/seo_aware.rst +++ b/bundles/seo/seo_aware.rst @@ -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 From 9a910130523e4ad026f54f71e0c45d3616f7c624 Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Wed, 24 Sep 2014 00:50:03 -0500 Subject: [PATCH 2/4] add note on traits and more corrections --- bundles/seo/seo_aware.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bundles/seo/seo_aware.rst b/bundles/seo/seo_aware.rst index 8a89b81c..99f47d28 100644 --- a/bundles/seo/seo_aware.rst +++ b/bundles/seo/seo_aware.rst @@ -30,6 +30,9 @@ the ``SeoMetadata``:: } } +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; @@ -220,7 +223,7 @@ object: -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. @@ -233,7 +236,7 @@ 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 @@ -241,7 +244,7 @@ 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:: From fc9c46cac44acd6ddfe60afa85a08d181616b832 Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Wed, 24 Sep 2014 00:58:56 -0500 Subject: [PATCH 3/4] final correction for now --- bundles/seo/extractors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/seo/extractors.rst b/bundles/seo/extractors.rst index f6ba2155..770d60fa 100644 --- a/bundles/seo/extractors.rst +++ b/bundles/seo/extractors.rst @@ -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 From a35340d004fdc36ac3c7fe0d85b1da3445402ba3 Mon Sep 17 00:00:00 2001 From: Luis Cordova Date: Wed, 24 Sep 2014 01:38:45 -0500 Subject: [PATCH 4/4] add trait note inside a tip tag --- bundles/seo/seo_aware.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bundles/seo/seo_aware.rst b/bundles/seo/seo_aware.rst index 99f47d28..78cb5f9b 100644 --- a/bundles/seo/seo_aware.rst +++ b/bundles/seo/seo_aware.rst @@ -30,8 +30,10 @@ the ``SeoMetadata``:: } } -If you are using PHP5.4+ you may also benefit from using the trait ``SeoAwareTrait`` -to plug these behavior into your model. +.. 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::