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

Commit

Permalink
crosslink, cleanup and add some additional sections to the multilang …
Browse files Browse the repository at this point in the history
…tutorial
  • Loading branch information
dbu committed Mar 1, 2013
1 parent 1a4b4fb commit f213b43
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 73 deletions.
10 changes: 5 additions & 5 deletions bundles/blog.rst
Expand Up @@ -76,8 +76,8 @@ in ``app/config/config.yml``:
Sonata Admin
~~~~~~~~~~~~

The ``BlogBundle`` has admin services defined for Sonata Admin, to make the blog
system visible on your dashboard, add the following to the
The ``BlogBundle`` has admin services defined for Sonata Admin, to make the blog
system visible on your dashboard, add the following to the
``sonata_admin`` section:

.. code-block:: yaml
Expand All @@ -97,7 +97,7 @@ Tree Browser Bundle
~~~~~~~~~~~~~~~~~~~

If you use the Symfony CMF Tree Browser bundle you can expose the blog routes
to enable blog edition from the tree browser. Expose the routes in the
to enable blog edition from the tree browser. Expose the routes in the
``fos_js_routing`` section of ``app/config/config.yml``:

.. code-block:: yaml
Expand All @@ -118,8 +118,8 @@ Templating
The default templates are marked up for `Twitter Bootstrap <http://twitter.github.com/bootstrap/>`_.
But it is easy to completely customize the templates by **overriding** them.

The one template you will have to override is the default layout, you will need
to change it and make it extend your applications layout. The easiest way to do
The one template you will have to override is the default layout, you will need
to change it and make it extend your applications layout. The easiest way to do
this is to create the following file:

.. code-block:: jinja
Expand Down
2 changes: 1 addition & 1 deletion bundles/phpcr-odm.rst
Expand Up @@ -470,7 +470,7 @@ correct.
constraints:
- Doctrine\Bundle\PHPCRBundle\Validator\Constraints\ValidPhpcrOdm
.. code-block:: php-annotations
.. code-block:: php
// src/Acme/BlogBundle/Entity/Author.php
Expand Down
2 changes: 1 addition & 1 deletion bundles/search.rst
Expand Up @@ -10,7 +10,7 @@ to provide a site wide search.
Dependencies
------------

* `LiipSearchBundle <https://github.com/liip/LiipSearchBundle#readme>`_
* `LiipSearchBundle <https://github.com/liip/LiipSearchBundle>`_

Configuration
-------------
Expand Down
11 changes: 6 additions & 5 deletions components/routing.rst
Expand Up @@ -58,7 +58,7 @@ stack Symfony2 framework, this is identified by the ``_controller`` field
of the parameters.

The ``ChainRouter`` works by accepting a set of prioritized routing strategies,
`RouterInterface <http://api.symfony.com/2.1/Symfony/Component/Routing/RouterInterface.html>`_
`RouterInterface <http://api.symfony.com/master/Symfony/Component/Routing/RouterInterface.html>`_
implementations, commonly referred to as "Routers".

When handling an incoming request, the ChainRouter iterates over the configured Routers,
Expand Down Expand Up @@ -121,7 +121,7 @@ NestedMatcher

The provided ``RequestMatcherInterface`` implementation is ``NestedMatcher``.
It is suitable for use with ``DynamicRouter``, and it uses a multiple step
matching process to determine the resulting routing parameters from a given
matching process to determine the resulting routing parameters from a given
`Request <http://api.symfony.com/master/Symfony/Component/HttpFoundation/Request.html>`_.

It uses a ``RouteProviderInterface`` implementation, which is capable of
Expand All @@ -132,7 +132,7 @@ implemented on top of Doctrine PHPCR ODM or a relational database,
effectively allowing you to store and manage routes dynamically from database.

The ``NestedMatcher`` uses a 3-step matching process to determine which Route
to use when handling the current Request:
to use when handling the current Request:

* Ask the ``RouteProviderInterface`` for the collection of ``Route`` instances potentially matching the ``Request``
* Apply all ``RouteFilterInterface`` to filter down this collection
Expand Down Expand Up @@ -231,7 +231,7 @@ The included ``ProviderBasedGenerator`` extends Symfony2's default
`UrlGenerator <http://api.symfony.com/master/Symfony/Component/Routing/Generator/UrlGenerator.html>`_
(which, in turn, implements ``UrlGeneratorInterface``) and - if $name is
not already a ``Route`` object - loads the route from the ``RouteProviderInterface``.
It then lets the core logic generate the URL from that Route.
It then lets the core logic generate the URL from that Route.

The bundle also include the ``ContentAwareGenerator``, which extends the
``ProviderBasedGenerator`` to check if $name is an object implementing
Expand All @@ -244,6 +244,7 @@ three ways:
* Or provide an implementation of ``ContentRepositoryInterface`` and pass the id
of the content object as parameter ``content_id`` and ``null`` as $name.

.. _route-generator-and-locales:

ContentAwareGenerator and locales
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -290,7 +291,7 @@ an integration bundle is also available. We strongly recommend that you take
a look at :doc:`../bundles/routing-extra`.

For a starter's guide to the Routing bundle and its integration with Symfony2,
refer to :doc:`../getting-started/routing`
refer to :doc:`../getting-started/routing`

We strongly recommend reading Symfony2's
`Routing <http://symfony.com/doc/current/components/routing/introduction.html>`__
Expand Down
6 changes: 5 additions & 1 deletion getting-started/routing.rst
Expand Up @@ -153,7 +153,7 @@ is carried out can be found in the :doc:`../components/routing`.
interface (see at the bottom) or with fixtures.

However, before we can explain how to do that, you need to understand how
the DynamicRouter works. An example will come later in this document.
the DynamicRouter works. An example will come :ref:`later in this document <routing-document>`.

.. _routing-getting-controller-template:

Expand Down Expand Up @@ -264,6 +264,9 @@ urls, with a few added possibilities:
* Pass either an implementation of ``RouteObjectInterface`` or a ``RouteAwareInterface`` as ``name`` parameter
* Or supply an implementation of ``ContentRepositoryInterface`` and the id of the model instance as parameter ``content_id``

The route generation handles locales as well, see :ref:`route-generator-and-locales`.

.. _routing-document:

The PHPCR-ODM route document
----------------------------
Expand Down Expand Up @@ -351,3 +354,4 @@ For more information on the Routing component of Symfony CMF, please refer to:
- :doc:`../components/routing` for most of the actual functionality implementation
- :doc:`../bundles/routing-extra` for Symfony2 integration bundle for Routing Bundle
- Symfony2's `Routing <http://symfony.com/doc/current/components/routing/introduction.html>`_ component page
- :doc:`../tutorials/handling-multilang-documents` for some notes on multilingual routing
5 changes: 3 additions & 2 deletions index.rst
Expand Up @@ -36,7 +36,7 @@ There are basically two main target audiences:

#. Developers that have built an existing custom application with Symfony2 and need a fast
way to add support for content management. Be it sophisticated CMS features like semantic
content, inline editing, multi-channel delivery etc. or just a few content pages for things
content, inline editing, multi-channel delivery etc. or just a few content pages for things
like the about/contact pages.

#. Developers that need to build a highly customized authoring and content delivery
Expand All @@ -50,7 +50,7 @@ Just started learning about the CMF? Want to know if the CMF fits your project?

.. toctree::
:maxdepth: 1

getting-started/installing-symfony-cmf
getting-started/routing
getting-started/content
Expand All @@ -72,6 +72,7 @@ Want to know more about the CMF and how each part can be configured? There's a t
tutorials/installing-configuring-inline-editing
tutorials/creating-cms-using-cmf-and-sonata
tutorials/using-blockbundle-and-contentbundle
tutorials/handling-multilang-documents

Bundles
-------
Expand Down
6 changes: 6 additions & 0 deletions tutorials/creating-cms-using-cmf-and-sonata.rst
Expand Up @@ -212,3 +212,9 @@ If you have not yet added anything to the content repository, the tree view will
cannot find a root node. To fix this, load some data as fixtures by following this doc:

- :doc:`using-blockbundle-and-contentbundle`

Further reading
---------------

* :doc:`../bundles/doctrine_phpcr_admin`
* :doc:`handling-multilang-documents`

0 comments on commit f213b43

Please sign in to comment.