@@ -8,10 +8,6 @@ RoutingAutoBundle
88The RoutingAutoBundle allows you to automatically persist routes when
99documents are persisted based on URI schemas and contextual information.
1010
11- This implies a separation of the ``Route `` and ``Content `` documents. If your
12- needs are simple this bundle may not be for you and you should have a look at
13- :doc: `the SimpleCmsBundle <../simple_cms/introduction >`.
14-
1511Installation
1612------------
1713
@@ -44,20 +40,22 @@ Features
4440--------
4541
4642Imagine you are going to create a forum application that has two routeable
47- content documents - a category and the topics. These documents are called
48- ``Category `` and ``Topic ``, and they are called *content documents *.
49-
50- If you create a new category with the title "My New Category", the
51- RoutingAutoBundle will automatically create the route
52- ``/forum/my-new-cateogry ``. For each new ``Topic `` it could create a route
53- like ``/forum/my-new-category/my-new-topic ``. This URI resolves to a special
54- type of route that is called an *auto route *.
55-
56- By default, when you update a content document that has an auto route, the
57- corresponding auto route will also be updated. When deleting a content
58- document, the corresponding auto route will also be deleted.
59-
60- If required, the bundle can also be configured to do extra stuff, like, for
43+ content documents - the categories and the topics. They are defined in the
44+ document classes ``Category `` and ``Topic ``. In general, we speak of them as
45+ *content documents *.
46+
47+ With the proper setup, routing auto automatically creates the route
48+ ``/forum/my-new-cateogry `` when you create a new category with the title
49+ "My New Category". For each new ``Topic ``, it creates a route like
50+ ``/forum/my-new-category/my-new-topic ``.
51+
52+ The routes created by this bundle are documents of a special class
53+ ``AutoRoute `` so that they can be recognized by the application as having been
54+ auto created. By default, when you update a content document that has an auto
55+ route, the corresponding auto route will also be updated. When deleting such a
56+ content document, the corresponding auto route will also be deleted.
57+
58+ If required, the bundle can also be configured to do extra things, like, for
6159example, leaving a ``RedirectRoute `` when the location of a content document
6260changes or automatically displaying an index page when an unconfigured
6361intermediate path is accessed (for example, listing all the children when requesting
8987-----
9088
9189Imagine you have a fictional forum application and that you want to access the
92- forum topic with the following fictional URI:
90+ forum topic with the following URI:
9391
9492- ``https://mywebsite.com/my-forum/drinks/coffee ``
9593
@@ -168,8 +166,8 @@ follows::
168166 }
169167 }
170168
171- After persisting this object, the route will be created. You will of course
172- be wanting to return property values and not static strings, but you get the
169+ After persisting this object, the route will be created. Your classes will of
170+ course be returning property values and not static strings, but you get the
173171idea.
174172
175173.. note ::
@@ -178,7 +176,8 @@ idea.
178176 object. Imagine you have 2 documents, ``ContactPage `` and ``Page ``, which
179177 both extend ``AbstractPage ``. When you map the ``AbstractPage `` class, it
180178 will be applied to both documents. You can also use the ``extend `` keyword
181- to achieve the same thing with objects which are not related.
179+ in the auto routing configuration file to achieve the same thing with
180+ objects which are not related.
182181
183182This is just a basic example. You can also configure what should happen when
184183a route already exists (conflict resolution) and what to do with old routes
0 commit comments