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

tweak seo bundle content listener documentation #711

Merged
merged 1 commit into from
Oct 8, 2015
Merged
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
13 changes: 7 additions & 6 deletions bundles/seo/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,19 @@ The ContentListener
~~~~~~~~~~~~~~~~~~~

The ``Symfony\Cmf\Bundle\SeoBundle\EventListener\ContentListener`` looks for a
content document in the request attributes. If it finds a document that is
suitable for extracting metadata, the listener calls
``SeoPresentationInterface::updateSeoPage`` to populate the metadata
information.
content document in the request attributes. If the listener finds a document,
it calls ``SeoPresentationInterface::updateSeoPage`` to populate the metadata
information if possible.

If the :doc:`RoutingBundle <../routing/introduction>` is installed, the default
attribute name is defined by the constant ``DynamicRouter::CONTENT_KEY``. When
not using the RoutingBundle, you need to disable the listener or configure a
key in ``cmf_seo.content_key``.

You may also want to disable this listener when implementing your own mechanism
to extract SEO information.
If you need different behavior, build your own mechanism to extract the SEO
information and disable this listener at ``cmf_seo.content_listener.enabled``
to avoid duplicated work. Things that happen on every request are expensive in
terms of application performance.

Extracting Metadata
~~~~~~~~~~~~~~~~~~~
Expand Down