|
| 1 | +.. index:: |
| 2 | + single: Tutorial, Creating a CMS, RoutingAuto, PHPCR-ODM |
| 3 | + single: MenuBundle, SonataAdmin, SonataDoctrineAdminBundle |
| 4 | + |
| 5 | +Creating a Basic CMS Using the RoutingAutoBundle |
| 6 | +================================================ |
| 7 | + |
| 8 | +This three part article will show you how to create a basic CMS from scratch |
| 9 | +using the following bundles: |
| 10 | + |
| 11 | +* :doc:`../bundles/routing_auto`; |
| 12 | +* :doc:`../bundles/phpcr_odm`; |
| 13 | +* :doc:`../bundles/menu/index`; |
| 14 | +* `SonataDoctrinePhpcrAdminBundle`_. |
| 15 | + |
| 16 | +It is assumed that you have: |
| 17 | + |
| 18 | +* A working knowledge of the Symfony 2 framework; |
| 19 | +* Basic knowledge of PHPCR-ODM. |
| 20 | + |
| 21 | +The CMS will have two types of content: |
| 22 | + |
| 23 | +* **Pages**: HTML content accessed at, for example ``/page/home``, ``/page/about``, etc. |
| 24 | +* **Posts**: Blog posts accessed as ``/blog/2012/10/23/my-blog-post``. |
| 25 | + |
| 26 | +The auto routing integration will automatically create and update the routes |
| 27 | +(effectively the URLs with which you can access the content) for the page and |
| 28 | +post content documents. In addition each page content document will double up |
| 29 | +as a menu item. |
| 30 | + |
| 31 | +.. image:: ../../_images/cookbook/basic-cms-intro-sketch.png |
| 32 | + |
| 33 | +.. note:: |
| 34 | + |
| 35 | + There exists a bundle called :doc:`../bundles/simple_cms/index` which |
| 36 | + provides a similar solution to the one proposed in this tutorial. It |
| 37 | + combines the route, menu and content into a single document and uses a |
| 38 | + custom router. The approach taken in this tutorial will combine only the menu |
| 39 | + and content into a single document, the routes will be managed |
| 40 | + automatically and the native CMF ``DynamicRouter`` will be used. |
| 41 | + |
| 42 | +.. _`SonataDoctrinePhpcrAdminBundle`: https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle |
0 commit comments