diff --git a/book/handling_multilang.rst b/book/handling_multilang.rst index 93588a6e..73a8fc63 100644 --- a/book/handling_multilang.rst +++ b/book/handling_multilang.rst @@ -152,8 +152,8 @@ Sonata PHPCR-ODM Admin Using sonata admin is one way to make your content editable. A book chapter on sonata admin is planned. Meanwhile, read - :doc:`Sonata Admin <../cookbook/creating_a_cms/sonata-admin>` in the - "Creating a CMS" tutorial. + :doc:`Sonata Admin <../tutorial/sonata-admin>` in the "Creating a CMS" + tutorial. The first step is to configure sonata admin. You should place the LuneticsLocaleBundle language switcher in the ``topnav`` bar. To do this, diff --git a/book/installation.rst b/book/installation.rst index dafdeaf9..433edc6b 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -215,7 +215,7 @@ Adding new pages Symfony CMF SE does not provide any admin tools to create new pages. If you are interested in adding an admin UI one solution can be found in -:doc:`../cookbook/creating_a_cms/sonata-admin`. However, if all you want +:doc:`../tutorial/sonata-admin`. However, if all you want is a simple way to add new pages that you can then edit via the inline editing, then you can use the SimpleCmsBundle ``page`` migrator. For example, to add a page called "Testing", creating a file called diff --git a/book/static_content.rst b/book/static_content.rst index e5b79f33..d3c4bba9 100644 --- a/book/static_content.rst +++ b/book/static_content.rst @@ -60,7 +60,7 @@ SonataDoctrinePHPCRAdminBundle_, a back office generation tool. In ContentBundle, the required administration panels are already declared in the ``Admin`` folder and configured in ``Resources/config/admin.xml``, and will automatically be loaded if you install the SonataDoctrinePHPCRAdminBundle -(refer to :doc:`../cookbook/creating_a_cms/sonata-admin` for +(refer to :doc:`../tutorial/sonata-admin` for instructions on that). Configuration diff --git a/book/structuring_content.rst b/book/structuring_content.rst index f5d898f9..bf94eacf 100644 --- a/book/structuring_content.rst +++ b/book/structuring_content.rst @@ -164,8 +164,8 @@ SonataDoctrinePHPCRAdminBundle_. The included administration panels are automatically available but need to be explicitly put on the dashboard if you want to use them. See -:doc:`../cookbook/creating_a_cms/sonata-admin` for instructions on how -to install SonataDoctrinePHPCRAdminBundle. +:doc:`../tutorial/sonata-admin` for instructions on how to install +SonataDoctrinePHPCRAdminBundle. Configuration ~~~~~~~~~~~~~ diff --git a/reference/configuration/partials/persistence_phpcr_enabled.rst.inc b/bundles/_partials/persistence_phpcr_enabled.rst.inc similarity index 100% rename from reference/configuration/partials/persistence_phpcr_enabled.rst.inc rename to bundles/_partials/persistence_phpcr_enabled.rst.inc diff --git a/reference/configuration/partials/persistence_phpcr_manager_name.rst.inc b/bundles/_partials/persistence_phpcr_manager_name.rst.inc similarity index 100% rename from reference/configuration/partials/persistence_phpcr_manager_name.rst.inc rename to bundles/_partials/persistence_phpcr_manager_name.rst.inc diff --git a/reference/configuration/partials/persistence_phpcr_sonata_admin_enabled.rst.inc b/bundles/_partials/persistence_phpcr_sonata_admin_enabled.rst.inc similarity index 100% rename from reference/configuration/partials/persistence_phpcr_sonata_admin_enabled.rst.inc rename to bundles/_partials/persistence_phpcr_sonata_admin_enabled.rst.inc diff --git a/reference/configuration/block.rst b/bundles/block/configuration.rst similarity index 96% rename from reference/configuration/block.rst rename to bundles/block/configuration.rst index bcaafe06..f0b6ad84 100644 --- a/reference/configuration/block.rst +++ b/bundles/block/configuration.rst @@ -1,10 +1,9 @@ -BlockBundle Configuration -========================= +Configuration Reference +======================= -The BlockBundle provides integration with SonataBlockBundle and can be -configured under the ``cmf_block`` key in your application configuration. When -using XML, you can use the ``http://cmf.symfony.com/schema/dic/block`` -namespace. +The BlockBundle can be configured under the ``cmf_block`` key in your +application configuration. When using XML, you can use the +``http://cmf.symfony.com/schema/dic/block`` namespace. The BlockBundle *automatically* changes some defaults and adds configuration to the SonataBlockBundle to make the integration work seamlessly. See the @@ -114,7 +113,7 @@ is the following configuration: enabled """"""" -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc block_basepath """""""""""""" @@ -123,13 +122,13 @@ block_basepath The basepath for blocks in the PHPCR tree. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``%cmf_core.persistence.phpcr.basepath%/content``. manager_name """""""""""" -.. include:: partials/persistence_phpcr_manager_name.rst.inc +.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc string_document_class """"""""""""""""""""" @@ -192,7 +191,7 @@ use_sonata_admin If ``true``, the admin classes are activated. If set to ``auto``, they are activated only if the SonataPhpcrAdminBundle is present. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to the value +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``cmf_core.persistence.phpcr.use_sonata_admin``. string_admin_class @@ -417,3 +416,4 @@ token A unique secret key. A random one is generated by default. .. _`SonataCacheBundle`: https://github.com/sonata-project/SonataCacheBundle + diff --git a/bundles/block/index.rst b/bundles/block/index.rst index 1a7a5981..64489c38 100644 --- a/bundles/block/index.rst +++ b/bundles/block/index.rst @@ -9,3 +9,4 @@ BlockBundle create_your_own_blocks cache relation_to_sonata_block_bundle + configuration diff --git a/bundles/block/introduction.rst b/bundles/block/introduction.rst index ca3b0d1b..9dd5dde0 100644 --- a/bundles/block/introduction.rst +++ b/bundles/block/introduction.rst @@ -390,6 +390,7 @@ Read on * :doc:`create_your_own_blocks` * :doc:`cache` * :doc:`relation_to_sonata_block_bundle` +* :doc:`configuration` .. _`symfony-cmf/block-bundle`: https://packagist.org/packages/symfony-cmf/block-bundle .. _`with composer`: http://getcomposer.org diff --git a/reference/configuration/content.rst b/bundles/content/configuration.rst similarity index 87% rename from reference/configuration/content.rst rename to bundles/content/configuration.rst index c1039497..9a3cc25c 100644 --- a/reference/configuration/content.rst +++ b/bundles/content/configuration.rst @@ -1,9 +1,8 @@ -ContentBundle configuration -=========================== +Configuration Reference +======================= -The ContentBundle provides a document and controller for static content and -can be configured under the ``cmf_content`` key in your application -configuration. When using XML, you can use the +The ContentBundle can be configured under the ``cmf_content`` key in your +application configuration. When using XML, you can use the ``http://cmf.symfony.com/schema/dic/content`` namespace. Configuration @@ -74,7 +73,7 @@ is the following configuration: enabled ******* -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc admin_class *********** @@ -106,5 +105,5 @@ If ``true``, the admin classes for SimpleCmsBundle pages are activated. If set to ``auto``, the admin services are activated only if the SonataPhpcrAdminBundle is present. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``cmf_core.persistence.phpcr.use_sonata_admin``. diff --git a/cookbook/exposing_content_via_rest.rst b/bundles/content/exposing_content_via_rest.rst similarity index 92% rename from cookbook/exposing_content_via_rest.rst rename to bundles/content/exposing_content_via_rest.rst index a67d6cf6..e224eda7 100644 --- a/cookbook/exposing_content_via_rest.rst +++ b/bundles/content/exposing_content_via_rest.rst @@ -1,6 +1,5 @@ .. index:: - single: Tutorial, REST - single: ContentBundle + single: ContentBundle; Rest Exposing Content via REST ========================= @@ -8,17 +7,9 @@ Exposing Content via REST Many applications need to expose content via REST APIs to partners or to enable integration into other applications. As the CMF is build on top of Symfony2, it's possible to leverage many of the available bundles to -provide a REST API for content stored in the CMF. This cookbook will -detail how to provide a read API using the following bundles: - -* :doc:`Cmf ContentBundle <../bundles/content/index>`; -* `FOSRestBundle`_; -* `JMSSerializerBundle`_. - -It is assumed that you have: - -* A working knowledge of the Symfony2 CMF framework; -* An application with the ContentBundle setup. +provide a REST API for content stored in the CMF. This guide will +detail how to provide a read API for your content using the following bundles +`FOSRestBundle`_ and `JMSSerializerBundle`_. Installation ------------ @@ -31,9 +22,9 @@ to generate the REST output. The best choice is the JMSSerializerBundle: .. code-block:: javascript { - .. + ... "require": { - .. + ... "friendsofsymfony/rest-bundle": "1.*", "jms/serializer-bundle": "0.13.*", } diff --git a/bundles/content/index.rst b/bundles/content/index.rst index 4e7fe714..ad2c584f 100644 --- a/bundles/content/index.rst +++ b/bundles/content/index.rst @@ -5,3 +5,5 @@ ContentBundle :maxdepth: 2 introduction + configuration + exposing_content_via_rest diff --git a/bundles/content/introduction.rst b/bundles/content/introduction.rst index a8255eab..35dd526d 100644 --- a/bundles/content/introduction.rst +++ b/bundles/content/introduction.rst @@ -226,5 +226,11 @@ removing static content from the admin panel. To enable the admin, use the also provides :ref:`several useful extensions ` for SonataAdminBundle. +Read On +------- + +* :doc:`configuration` +* :doc:`exposing_content_via_rest` + .. _`with composer`: http://getcomposer.org .. _`symfony-cmf/content-bundle`: https://packagist.org/packages/symfony-cmf/content-bundle diff --git a/reference/configuration/core.rst b/bundles/core/configuration.rst similarity index 81% rename from reference/configuration/core.rst rename to bundles/core/configuration.rst index e5c7ff89..e0cbb432 100644 --- a/reference/configuration/core.rst +++ b/bundles/core/configuration.rst @@ -1,9 +1,9 @@ -CoreBundle Configuration -======================== +Configuration Reference +======================= -The CoreBundle provides infrastructure for other CMF bundles and can be configured -under the ``cmf_core`` key in your application configuration. When using -XML, you can use the ``http://cmf.symfony.com/schema/dic/core`` namespace. +The CoreBundle can be configured under the ``cmf_core`` key in your application +configuration. When using XML, you can use the +``http://cmf.symfony.com/schema/dic/core`` namespace. Configuration ------------- @@ -117,19 +117,19 @@ is the following configuration: enabled """"""" -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc Enabling this setting will also automatically enable the equivalent setting in the following Bundles: -* :doc:`BlockBundle <../../bundles/block/introduction>` -* :doc:`ContentBundle <../../bundles/content/introduction>` -* :doc:`CreateBundle <../../bundles/create/introduction>` -* :doc:`MediaBundle <../../bundles/media/introduction>` -* :doc:`MenuBundle <../..//bundles/menu/index>` -* :doc:`RoutingBundle <../../bundles/routing/introduction>` -* :doc:`SearchBundle <../../bundles/search/introduction>` -* :doc:`SimpleCmsBundle <../../bundles/simple_cms/introduction>` -* :doc:`TreeBrowserCmsBundle <../../bundles/tree_browser/introduction>` +* :doc:`BlockBundle <../block/introduction>` +* :doc:`ContentBundle <../content/introduction>` +* :doc:`CreateBundle <../create/introduction>` +* :doc:`MediaBundle <../media/introduction>` +* :doc:`MenuBundle <../menu/introduction>` +* :doc:`RoutingBundle <../routing/introduction>` +* :doc:`SearchBundle <../search/introduction>` +* :doc:`SimpleCmsBundle <../simple_cms/introduction>` +* :doc:`TreeBrowserCmsBundle <../tree_browser/introduction>` basepath """""""" @@ -140,13 +140,13 @@ The basepath for CMS documents in the PHPCR tree. Enabling this setting will also automatically enable the equivalent settings in the following Bundles: -* :doc:`BlockBundle <../../bundles/block/introduction>` -* :doc:`ContentBundle <../../bundles/content/introduction>` -* :doc:`MediaBundle <../../bundles/media/introduction>` -* :doc:`MenuBundle <../..//bundles/menu/index>` -* :doc:`RoutingBundle <../../bundles/routing/introduction>` -* :doc:`SearchBundle <../../bundles/search/introduction>` -* :doc:`SimpleCmsBundle <../../bundles/simple_cms/introduction>` +* :doc:`BlockBundle <../block/introduction>` +* :doc:`ContentBundle <../content/introduction>` +* :doc:`MediaBundle <../media/introduction>` +* :doc:`MenuBundle <../menu/introduction>` +* :doc:`RoutingBundle <../routing/introduction>` +* :doc:`SearchBundle <../search/introduction>` +* :doc:`SimpleCmsBundle <../simple_cms/introduction>` manager_registry """""""""""""""" @@ -155,8 +155,8 @@ manager_registry Enabling this setting will also automatically enable the equivalent settings in the following Bundles: -* :doc:`SearchBundle <../../bundles/search/introduction>` -* :doc:`SimpleCmsBundle <../../bundles/simple_cms/introduction>` +* :doc:`SearchBundle <../search/introduction>` +* :doc:`SimpleCmsBundle <../simple_cms/introduction>` manager_name """""""""""" @@ -168,12 +168,12 @@ retrieve the default manager. Enabling this setting will also automatically enable the equivalent setting in the following Bundles: -* :doc:`BlockBundle <../../bundles/block/introduction>` -* :doc:`MediaBundle <../../bundles/media/introduction>` -* :doc:`MenuBundle <../..//bundles/menu/index>` -* :doc:`RoutingBundle <../../bundles/routing/introduction>` -* :doc:`SearchBundle <../../bundles/search/introduction>` -* :doc:`SimpleCmsBundle <../../bundles/simple_cms/introduction>` +* :doc:`BlockBundle <../block/introduction>` +* :doc:`MediaBundle <../media/introduction>` +* :doc:`MenuBundle <../menu/introduction>` +* :doc:`RoutingBundle <../routing/introduction>` +* :doc:`SearchBundle <../search/introduction>` +* :doc:`SimpleCmsBundle <../simple_cms/introduction>` use_sonata_admin """""""""""""""" @@ -186,11 +186,11 @@ SonataPhpcrAdminBundle is present. Enabling this setting will also automatically enable the equivalent setting in the following Bundles: -* :doc:`BlockBundle <../../bundles/block/introduction>` -* :doc:`ContentBundle <../../bundles/content/introduction>` -* :doc:`MenuBundle <../..//bundles/menu/index>` -* :doc:`RoutingBundle <../../bundles/routing/introduction>` -* :doc:`SimpleCmsBundle <../../bundles/simple_cms/introduction>` +* :doc:`BlockBundle <../block/introduction>` +* :doc:`ContentBundle <../content/introduction>` +* :doc:`MenuBundle <../menu/introduction>` +* :doc:`RoutingBundle <../routing/introduction>` +* :doc:`SimpleCmsBundle <../simple_cms/introduction>` translation_strategy """""""""""""""""""" @@ -214,8 +214,8 @@ If multilang is enabled, the ``TranslatableExtension`` for ``SonataAdminBundle`` is enabled and the locales will be configured on all CMF bundles that use this configuration: -* :doc:`RoutingBundle <../../bundles/routing/introduction>` -* :doc:`SimpleCmsBundle <../../bundles/simple_cms/introduction>` +* :doc:`RoutingBundle <../routing/introduction>` +* :doc:`SimpleCmsBundle <../simple_cms/introduction>` .. configuration-block:: diff --git a/bundles/core/index.rst b/bundles/core/index.rst index 851ab39f..317698fa 100644 --- a/bundles/core/index.rst +++ b/bundles/core/index.rst @@ -10,3 +10,4 @@ CoreBundle templating persistence forms + configuration diff --git a/bundles/core/introduction.rst b/bundles/core/introduction.rst index 744dca15..99c0f52d 100644 --- a/bundles/core/introduction.rst +++ b/bundles/core/introduction.rst @@ -30,6 +30,7 @@ Sections * :doc:`dependency_injection_tags` * :doc:`templating` * :doc:`persistence` +* :doc:`configuration` .. _`symfony-cmf/core-bundle`: https://packagist.org/packages/symfony-cmf/core-bundle .. _`with composer`: http://getcomposer.org diff --git a/reference/configuration/create.rst b/bundles/create/configuration.rst similarity index 94% rename from reference/configuration/create.rst rename to bundles/create/configuration.rst index acd10270..c5ee8e96 100644 --- a/reference/configuration/create.rst +++ b/bundles/create/configuration.rst @@ -1,9 +1,8 @@ -CreateBundle configuration -========================== +Configuration Reference +======================= -The CreateBundle provides front-end editing based on create.js and CreatePHP. -It can be configured under the ``cmf_create`` key in your application -configuration. When using XML you should use the +The CreateBundle can be configured under the ``cmf_create`` key in your +application configuration. When using XML you should use the ``http://cmf.symfony.com/schema/dic/create`` namespace. .. note:: @@ -136,18 +135,18 @@ persistence for this bundle to work. enabled """"""" -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc manager_name """""""""""" -.. include:: partials/persistence_phpcr_manager_name.rst.inc +.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc image """"" These settings are only used with the optional hallo editor. The default -CKEditor uses the :doc:`ELfinder plugin <../../bundles/media/adapters/elfinder>` +CKEditor uses the :doc:`ELfinder plugin <../media/adapters/elfinder>` provided by the MediaBundle. If you need different image handling, you can either overwrite diff --git a/bundles/create/index.rst b/bundles/create/index.rst index 4381441c..1f746826 100644 --- a/bundles/create/index.rst +++ b/bundles/create/index.rst @@ -5,5 +5,6 @@ CreateBundle :maxdepth: 2 introduction + configuration other-editors developing-hallo diff --git a/bundles/create/introduction.rst b/bundles/create/introduction.rst index 25822075..7f5553b0 100644 --- a/bundles/create/introduction.rst +++ b/bundles/create/introduction.rst @@ -513,6 +513,13 @@ configure the ``cmf_create.object_mapper_service_id``. CreatePHP would support specific mappers per RDFa type. If you need that, dig into the CreatePHP and CreateBundle and do a pull request to enable this feature. +Read On +------- + +* :doc:`developing-hallo` +* :doc:`other-editors` +* :doc:`configuration` + .. _`create.js`: http://createjs.org .. _`hallo.js`: http://hallojs.org diff --git a/bundles/map.rst.inc b/bundles/map.rst.inc index d4ed2efe..1c719231 100644 --- a/bundles/map.rst.inc +++ b/bundles/map.rst.inc @@ -11,6 +11,7 @@ library or they introduce a complete new concept. * :doc:`block/create_your_own_blocks` * :doc:`block/cache` * :doc:`block/relation_to_sonata_block_bundle` + * :doc:`block/configuration` * :doc:`core/index` @@ -20,18 +21,21 @@ library or they introduce a complete new concept. * :doc:`core/templating` * :doc:`core/persistence` * :doc:`core/forms` + * :doc:`core/configuration` * :doc:`create/index` * :doc:`create/introduction` * :doc:`create/other-editors` * :doc:`create/developing-hallo` + * :doc:`create/configuration` * :doc:`media/index` * :doc:`media/introduction` * :doc:`media/form_types` * :doc:`media/adapters/index` + * :doc:`media/configuration` * :doc:`menu/index` @@ -40,12 +44,14 @@ library or they introduce a complete new concept. * :doc:`menu/menu_factory` * :doc:`menu/menu_provider` * :doc:`menu/voters` + * :doc:`menu/configuration` * :doc:`routing/index` * :doc:`routing/introduction` * :doc:`routing/dynamic` * :doc:`routing/dynamic_customize` + * :doc:`routing/configuration` * :doc:`routing_auto/index` (in development) @@ -57,16 +63,19 @@ library or they introduce a complete new concept. * :doc:`search/index` * :doc:`search/introduction` + * :doc:`search/configuration` * :doc:`seo/index` * :doc:`seo/introduction` * :doc:`seo/seo_aware` * :doc:`seo/extractors` + * :doc:`seo/configuration` * :doc:`tree_browser/index` * :doc:`tree_browser/introduction` + * :doc:`tree_browser/configuration` Showcase Bundles ~~~~~~~~~~~~~~~~ @@ -83,6 +92,8 @@ bundle based on the key bundles. * :doc:`content/index` * :doc:`content/introduction` + * :doc:`content/configuration` + * :doc:`content/exposing_content_via_rest` * :doc:`simple_cms/index` @@ -91,6 +102,7 @@ bundle based on the key bundles. * :doc:`simple_cms/rendering` * :doc:`simple_cms/menus` * :doc:`simple_cms/extending_page_class` + * :doc:`simple_cms/configuration` Contributed Bundles ~~~~~~~~~~~~~~~~~~~ @@ -106,6 +118,7 @@ help with integrating PHPCR concepts into the Symfony Framework. * :doc:`phpcr_odm/fixtures_initializers` * :doc:`phpcr_odm/multilang` * :doc:`phpcr_odm/multiple_sessions` + * :doc:`phpcr_odm/configuration` * SonataDoctrinePHPCRAdminBundle_ diff --git a/reference/configuration/media.rst b/bundles/media/configuration.rst similarity index 93% rename from reference/configuration/media.rst rename to bundles/media/configuration.rst index 6069e044..95dc1782 100644 --- a/reference/configuration/media.rst +++ b/bundles/media/configuration.rst @@ -1,10 +1,8 @@ -MediaBundle Configuration -========================= +Configuration Reference +======================= -The MediaBundle provides a way to store and edit any media and provides a -generic base of common interfaces and models that allow the user to build media -management solutions for a CMS. It can be configured under the ``cmf_media`` -key in your application configuration. When using XML, you can use the +The MediaBundle can be configured under the ``cmf_media`` key in your +application configuration. When using XML, you can use the ``http://cmf.symfony.com/schema/dic/media`` namespace. Configuration @@ -92,7 +90,7 @@ is the following configuration: enabled """"""" -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc media_basepath """""""""""""" @@ -101,13 +99,13 @@ media_basepath The basepath for CMS media documents in the PHPCR tree. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to -the value of ``%cmf_core.persistence.phpcr.basepath%/media``. +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default +to the value of ``%cmf_core.persistence.phpcr.basepath%/media``. manager_name """""""""""" -.. include:: partials/persistence_phpcr_manager_name.rst.inc +.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc media_class """"""""""" diff --git a/bundles/media/index.rst b/bundles/media/index.rst index 57c1006c..2c420941 100644 --- a/bundles/media/index.rst +++ b/bundles/media/index.rst @@ -7,3 +7,4 @@ MediaBundle introduction form_types adapters/index + configuration diff --git a/reference/configuration/menu.rst b/bundles/menu/configuration.rst similarity index 89% rename from reference/configuration/menu.rst rename to bundles/menu/configuration.rst index cf1764ed..c25f8712 100644 --- a/reference/configuration/menu.rst +++ b/bundles/menu/configuration.rst @@ -1,8 +1,7 @@ -MenuBundle configuration -======================== +Configuration Reference +======================= -The MenuBundle provides a persistent menu system based on the KnpMenuBundle. -It can be configured under the ``cmf_menu`` key in your application +The MenuBundle can be configured under the ``cmf_menu`` key in your application configuration. When using XML you should use the ``http://cmf.symfony.com/schema/dic/menu`` namespace. @@ -83,7 +82,7 @@ persistence configuration has the following configuration: enabled """"""" -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc menu_basepath """"""""""""" @@ -94,11 +93,11 @@ Specifies the path in the PHPCR-ODM document hierarchy under which the menu documents can be found. * This is the default location used by the - :doc:`MenuProvider <../../bundles/menu/menu_factory>` to locate menus. + :doc:`MenuProvider <../menu/menu_factory>` to locate menus. * This is the default location for newly created menus in the Sonata admin class. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``%cmf_core.persistence.phpcr.basepath%/menu`` content_basepath @@ -110,7 +109,7 @@ Specifies the path in the PHPCR-ODM document hierarchy under which the content documents can be found. This is used by the admin class to pre-select the content branch of the document hierarchy in forms. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``%cmf_core.persistence.phpcr.basepath%/content`` .. versionadded:: 1.1 @@ -134,7 +133,7 @@ To disable menu prefetch completely, set this option to ``0``. manager_name """""""""""" -.. include:: partials/persistence_phpcr_manager_name.rst.inc +.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc menu_document_class """"""""""""""""""" @@ -157,7 +156,7 @@ This setting is used by the admin class. use_sonata_admin """""""""""""""" -.. include:: partials/persistence_phpcr_sonata_admin_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_sonata_admin_enabled.rst.inc menu_admin_class """""""""""""""" @@ -178,14 +177,16 @@ admin_recursive_breadcrumbs **type**: ``boolean`` **default**: ``true`` -When editing a node, this setting will cause the Sonata admin breadcrumb to include ancestors of the node being edited. +When editing a node, this setting will cause the Sonata admin breadcrumb to +include ancestors of the node being edited. Voter ----- **type**: ``array`` -The ``voters`` section enables you to enable and configure *pre-defined* :doc:`voters <../../bundles/menu/voters>`. +The ``voters`` section enables you to enable and configure *pre-defined* +:doc:`voters <../menu/voters>`. .. configuration-block:: @@ -257,11 +258,11 @@ publish_workflow The ``publish_workflow`` option was introduced in CmfMenuBundle 1.1. This configures if the menu content voter for the publish workflow should be -disabled, by default it is enabled if the :doc:`CoreBundle <../../bundles/core/index>` +disabled, by default it is enabled if the :doc:`CoreBundle <../core/introduction>` is registered, and the ``cmf_core.publish_workflow`` is enabled. For more information refer to the -:doc:`publish workflow documentation <../../bundles/core/publish_workflow>`. +:doc:`publish workflow documentation <../core/publish_workflow>`. To disable the menu content voter, use: diff --git a/bundles/menu/index.rst b/bundles/menu/index.rst index f38d31a3..725f3f25 100644 --- a/bundles/menu/index.rst +++ b/bundles/menu/index.rst @@ -10,3 +10,4 @@ MenuBundle menu_provider voters sonata_admin + configuration diff --git a/bundles/menu/introduction.rst b/bundles/menu/introduction.rst index 5fec0ac6..65507eb0 100644 --- a/bundles/menu/introduction.rst +++ b/bundles/menu/introduction.rst @@ -148,6 +148,16 @@ example is specified. This will render an unordered list as follows: For more information see the `rendering menus`_ section of the KnpMenuBundle documentation. +Read On +------- + +* :doc:`menu_documents` +* :doc:`menu_factory` +* :doc:`menu_provider` +* :doc:`voters` +* :doc:`sonata_admin` +* :doc:`configuration` + .. _`KnpMenu`: https://github.com/knplabs/KnpMenu .. _`KnpMenuBundle`: https://github.com/knplabs/KnpMenuBundle .. _`with composer`: http://getcomposer.org diff --git a/reference/configuration/phpcr_odm.rst b/bundles/phpcr_odm/configuration.rst similarity index 97% rename from reference/configuration/phpcr_odm.rst rename to bundles/phpcr_odm/configuration.rst index 38e89d13..205ccd58 100644 --- a/reference/configuration/phpcr_odm.rst +++ b/bundles/phpcr_odm/configuration.rst @@ -1,30 +1,21 @@ -DoctrinePHPCRBundle Configuration -================================= +Configuration Reference +======================= -The DoctrinePHPCRBundle provides integration with the PHP content -repository and optionally with Doctrine PHPCR-ODM to provide the ODM document -manager in Symfony. +The DoctrinePHPCRBundle can be configured under the ``doctrine_phpcr`` key in +your application configuration. When using XML, you can use the +``http://doctrine-project.org/schema/symfony-dic/odm/phpcr`` namespace. -It can be configured under the ``doctrine_phpcr`` key in your application -configuration. Configuration ------------- -.. tip:: - - If you want to only use plain PHPCR without the PHPCR-ODM, you can simply - not configure the ``odm`` section to avoid loading the services at all. - Note that most CMF bundles by default use PHPCR-ODM documents and thus - need ODM enabled. - session ~~~~~~~ .. tip:: You can also configure multiple session. See - :doc:`../../bundles/phpcr_odm/multiple_sessions` for details. + :doc:`../phpcr_odm/multiple_sessions` for details. .. configuration-block:: @@ -428,10 +419,17 @@ Doctrine PHPCR-ODM Configuration This configuration section manages the Doctrine PHPCR-ODM system. If you do not configure anything here, the ODM services will not be loaded. +.. tip:: + + If you want to only use plain PHPCR without the PHPCR-ODM, you can simply + not configure the ``odm`` section to avoid loading the services at all. + Note that most CMF bundles by default use PHPCR-ODM documents and thus + need ODM enabled. + .. tip:: You can also configure multiple document managers. See - :doc:`../../bundles/phpcr_odm/multiple_sessions` for details. + :doc:`../phpcr_odm/multiple_sessions` for details. .. configuration-block:: diff --git a/bundles/phpcr_odm/index.rst b/bundles/phpcr_odm/index.rst index a155b1b4..eb01e881 100644 --- a/bundles/phpcr_odm/index.rst +++ b/bundles/phpcr_odm/index.rst @@ -10,3 +10,4 @@ DoctrinePHPCRBundle fixtures_initializers multilang multiple_sessions + configuration diff --git a/bundles/phpcr_odm/introduction.rst b/bundles/phpcr_odm/introduction.rst index 5ad0739a..ba2c2f9d 100644 --- a/bundles/phpcr_odm/introduction.rst +++ b/bundles/phpcr_odm/introduction.rst @@ -65,8 +65,7 @@ PHPCR Session Configuration The session needs a PHPCR implementation specified in the ``backend`` section by the ``type`` field, along with configuration options to bootstrap the implementation. The examples here assume that you are using Jackalope Doctrine -DBAL. The full documentation is in the -:doc:`reference section <../../reference/configuration/phpcr_odm>`. +DBAL. The full documentation is in the :doc:`configuration reference `. To use Jackalope Doctrine DBAL, you need to configure a database connection with the DoctrineBundle. For detailed information, see the @@ -488,6 +487,7 @@ Read On * :doc:`fixtures_initializers` * :doc:`multilang` * :doc:`multiple_sessions` +* :doc:`configuration` .. _`DoctrinePHPCRBundle`: https://github.com/doctrine/DoctrinePHPCRBundle .. _`Symfony2 Doctrine documentation`: http://symfony.com/doc/current/book/doctrine.html diff --git a/reference/configuration/routing.rst b/bundles/routing/configuration.rst similarity index 94% rename from reference/configuration/routing.rst rename to bundles/routing/configuration.rst index 1bf69722..83889e80 100644 --- a/reference/configuration/routing.rst +++ b/bundles/routing/configuration.rst @@ -1,9 +1,9 @@ -RoutingBundle Configuration -=========================== +Configuration Reference +======================= -The RoutingBundle contains the Routing logic of the CMF and can be configured -under the ``cmf_routing`` key in your application configuration. When using -XML, you can use the ``http://cmf.symfony.com/schema/dic/routing`` namespace. +The RoutingBundle can be configured under the ``cmf_routing`` key in your +application configuration. When using XML, you can use the +``http://cmf.symfony.com/schema/dic/routing`` namespace. Configuration ------------- @@ -128,8 +128,8 @@ no explicit controller. The value is the name of a controller using either the ``AcmeDemoBundle::Page::index`` or ``acme_demo.controller.page:indexAction`` notation. -If the :doc:`CoreBundle <../../bundles/core/index>` and -:doc:`ContentBundle <../../bundles/content/index>` are registered, this +If the :doc:`CoreBundle <../core/introduction>` and +:doc:`ContentBundle <../content/introduction>` are registered, this defaults to ``cmf_content.controller:indexAction``. default_controller @@ -368,12 +368,12 @@ phpcr enabled ******* -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc manager_name ************ -.. include:: partials/persistence_phpcr_manager_name.rst.inc +.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc route_basepaths *************** @@ -382,9 +382,9 @@ route_basepaths The basepaths where to look for routes in the PHPCR tree. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to ``%cmf_core.persistence.phpcr.basepath%/routes``. If the -:doc:`SimpleCmsBundle <../../bundles/simple_cms/index>` is registered as well, +:doc:`SimpleCmsBundle <../simple_cms/introduction>` is registered as well, this will additionally default to ``%cmf_core.persistence.phpcr.basepath%/simple``. content_basepath @@ -395,7 +395,7 @@ content_basepath The basepath for content objects in the PHPCR tree. This information is used with the sonata admin to offer the correct subtree to select content documents. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to ``%cmf_core.persistence.phpcr.basepath%/content``. admin_basepath @@ -421,7 +421,7 @@ SonataPhpcrAdminBundle is present. configure it to show the items ``cmf_routing.route_admin`` and ``cmf_routing.redirect_route_admin``. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``cmf_core.persistence.phpcr.use_sonata_admin``. orm @@ -525,7 +525,7 @@ locales To enable multilanguage, set the valid locales in this option. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``cmf_core.locales``. limit_candidates @@ -556,7 +556,7 @@ For example, when the ``locales`` are ``de`` and ``en`` and the request has the url ``de/my/path``, the route provider will not only look for ``de/my/path``, ``de/my`` and ``de`` but also for ``my/path`` and ``my``. This allows to use a single route for multiple languages. This is used for example by the -:doc:`SimpleCms <../../bundles/simple_cms/index>`. +:doc:`SimpleCms <../simple_cms/introduction>`. If you do not need this, disabling the option will gain some performance. diff --git a/bundles/routing/index.rst b/bundles/routing/index.rst index 0ff6402a..dba49c18 100644 --- a/bundles/routing/index.rst +++ b/bundles/routing/index.rst @@ -7,3 +7,4 @@ RoutingBundle introduction dynamic dynamic_customize + configuration diff --git a/bundles/routing/introduction.rst b/bundles/routing/introduction.rst index ed07acac..10a358df 100644 --- a/bundles/routing/introduction.rst +++ b/bundles/routing/introduction.rst @@ -97,10 +97,11 @@ Further reading For more information on Routing in the Symfony CMF, please refer to: -* The documentation of the :doc:`dynamic`. -* The :doc:`routing introduction chapter <../../book/routing>` of the book. +* The documentation of the :doc:`dynamic`; +* The :doc:`configuration reference `; +* The :doc:`routing introduction chapter <../../book/routing>` of the book; * The :doc:`routing component documentation <../../components/routing/introduction>` - for implementation details of the routers. + for implementation details of the routers; * Symfony2's `Routing`_ component documentation. .. _`with composer`: http://getcomposer.org diff --git a/reference/configuration/search.rst b/bundles/search/configuration.rst similarity index 87% rename from reference/configuration/search.rst rename to bundles/search/configuration.rst index e55a141e..73582f39 100644 --- a/reference/configuration/search.rst +++ b/bundles/search/configuration.rst @@ -1,8 +1,7 @@ -SearchBundle Configuration -========================== +Configuration Reference +======================= -The SearchBundle provides integration with `LiipSearchBundle`_ to provide a -site wide search and can be configured under the ``cmf_search`` key in your +The SearchBundle can be configured under the ``cmf_search`` key in your application configuration. When using XML, you can use the ``http://cmf.symfony.com/schema/dic/search`` namespace. @@ -76,7 +75,7 @@ is the following configuration: enabled """"""" -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc search_basepath """"""""""""""" @@ -85,7 +84,7 @@ search_basepath The basepath for CMS documents in the PHPCR tree. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``%cmf_core.persistence.phpcr.basepath%/content``. manager_registry @@ -93,13 +92,13 @@ manager_registry **type**: ``string`` **default**: ``doctrine_phpcr`` -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``cmf_core.persistence.phpcr.manager_registry``. manager_name """""""""""" -.. include:: partials/persistence_phpcr_manager_name.rst.inc +.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc translation_strategy """""""""""""""""""" diff --git a/bundles/search/index.rst b/bundles/search/index.rst index 218ecff3..d2cb99a4 100644 --- a/bundles/search/index.rst +++ b/bundles/search/index.rst @@ -5,3 +5,4 @@ SearchBundle :maxdepth: 2 introduction + configuration diff --git a/bundles/search/introduction.rst b/bundles/search/introduction.rst index f925439b..ba596123 100644 --- a/bundles/search/introduction.rst +++ b/bundles/search/introduction.rst @@ -46,6 +46,11 @@ Finally, add the relevant routing to your configuration return $collection; +Read On +------- + +* :doc:`configuration` + .. _`LiipSearchBundle`: https://github.com/liip/LiipSearchBundle .. _`symfony-cmf/search-bundle`: https://packagist.org/packages/symfony-cmf/search-bundle .. _`with composer`: http://getcomposer.org diff --git a/reference/configuration/seo.rst b/bundles/seo/configuration.rst similarity index 86% rename from reference/configuration/seo.rst rename to bundles/seo/configuration.rst index fc22956e..fe2da9c7 100644 --- a/reference/configuration/seo.rst +++ b/bundles/seo/configuration.rst @@ -1,10 +1,9 @@ -SeoBundle Configuration +Configuration Reference ======================= -The SeoBundle takes care of the SEO information of a page and can be -configured under the ``cmf_seo`` key in your application configuration. When -using XML, you can use the ``http://cmf.symfony.com/schema/dic/seo`` -namespace. +The SeoBundle can be configured under the ``cmf_seo`` key in your application +configuration. When using XML, you can use the +``http://cmf.symfony.com/schema/dic/seo`` namespace. Configuration ------------- @@ -60,12 +59,12 @@ phpcr enabled ******* -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc manager_name ************ -.. include:: partials/persistence_phpcr_manager_name.rst.inc +.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc translation_domain ~~~~~~~~~~~~~~~~~~ @@ -124,7 +123,7 @@ enabled If ``true``, the Sonata Admin Extension will be activated. If set to ``auto``, it is activated only if the SonataPhpcrAdminBundle is present. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to the value +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``cmf_core.persistence.phpcr.use_sonata_admin``. form_group diff --git a/bundles/seo/index.rst b/bundles/seo/index.rst index 2c3866c1..b2ed2619 100644 --- a/bundles/seo/index.rst +++ b/bundles/seo/index.rst @@ -7,3 +7,4 @@ SeoBundle introduction seo_aware extractors + configuration diff --git a/bundles/seo/introduction.rst b/bundles/seo/introduction.rst index 3454a0c7..f744d30c 100644 --- a/bundles/seo/introduction.rst +++ b/bundles/seo/introduction.rst @@ -337,6 +337,9 @@ Conclusion That's it! You have now created a SEO optimized website using nothing more than a couple of simple settings. +Now you can start reading the full :doc:`configuration reference +` to learn even more about the settings. + .. _`SonataSeoBundle`: https://github.com/sonata-project/SonataSeoBundle .. _`with composer`: http://getcomposer.org .. _`packagist`: https://packagist.org/packages/symfony-cmf/menu-bundle diff --git a/reference/configuration/simple_cms.rst b/bundles/simple_cms/configuration.rst similarity index 88% rename from reference/configuration/simple_cms.rst rename to bundles/simple_cms/configuration.rst index 96043b91..a565ac47 100644 --- a/reference/configuration/simple_cms.rst +++ b/bundles/simple_cms/configuration.rst @@ -1,9 +1,9 @@ -SimpleCmsBundle Configuration -============================= +Configuration Reference +======================= -The SimpleCmsBundle provide a simple CMS solution and can be configured under -the ``cmf_simple_cms`` key in your application configuration. When using -XML, you can use the ``http://cmf.symfony.com/schema/dic/simplecms`` namespace. +The SimpleCmsBundle can be configured under the ``cmf_simple_cms`` key in your +application configuration. When using XML, you can use the +``http://cmf.symfony.com/schema/dic/simplecms`` namespace. Configuration ------------- @@ -79,7 +79,7 @@ is the following configuration: enabled """"""" -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc basepath """""""" @@ -88,7 +88,7 @@ basepath The basepath for CMS documents in the PHPCR tree. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``%cmf_core.persistence.phpcr.basepath%/simple``. manager_registry @@ -96,13 +96,13 @@ manager_registry **type**: ``string`` **default**: ``doctrine_phpcr`` -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``cmf_core.persistence.phpcr.manager_registry``. manager_name """""""""""" -.. include:: partials/persistence_phpcr_manager_name.rst.inc +.. include:: ../_partials/persistence_phpcr_manager_name.rst.inc document_class """""""""""""" @@ -120,7 +120,7 @@ If ``true``, the admin classes for SimpleCmsBundle pages are activated. If set to ``auto``, the admin services are activated only if the SonataPhpcrAdminBundle is present. -If the :doc:`CoreBundle <../../bundles/core/index>` is registered, this will default to the value +If the :doc:`CoreBundle <../core/introduction>` is registered, this will default to the value of ``cmf_core.persistence.phpcr.use_sonata_admin``. sonata_admin.sort diff --git a/bundles/simple_cms/index.rst b/bundles/simple_cms/index.rst index 0bfcf85e..865aa009 100644 --- a/bundles/simple_cms/index.rst +++ b/bundles/simple_cms/index.rst @@ -9,3 +9,4 @@ SimpleCmsBundle rendering menus extending_page_class + configuration diff --git a/bundles/simple_cms/introduction.rst b/bundles/simple_cms/introduction.rst index eedb0678..da55f632 100644 --- a/bundles/simple_cms/introduction.rst +++ b/bundles/simple_cms/introduction.rst @@ -37,6 +37,7 @@ Sections * :doc:`rendering` * :doc:`menus` * :doc:`extending_page_class` +* :doc:`configuration` .. _`Symfony CMF Standard Edition`: https://github.com/symfony-cmf/standard-edition .. _`CMF website`: https://github.com/symfony-cmf/cmf-website/ diff --git a/reference/configuration/tree_browser.rst b/bundles/tree_browser/configuration.rst similarity index 83% rename from reference/configuration/tree_browser.rst rename to bundles/tree_browser/configuration.rst index 9d287b19..49e1cdb6 100644 --- a/reference/configuration/tree_browser.rst +++ b/bundles/tree_browser/configuration.rst @@ -1,9 +1,8 @@ -TreeBrowserBundle Configuration -=============================== +Configuration Reference +======================= -The TreeBrowserBundle provides a tree navigation on top of a PHPCR -repository and can be configured under the ``cmf_tree_browser`` key in your -application configuration. When using XML, you can use the +The TreeBrowserBundle can be configured under the ``cmf_tree_browser`` key in +your application configuration. When using XML, you can use the ``http://cmf.symfony.com/schema/dic/treebrowser`` namespace. .. note:: @@ -66,7 +65,7 @@ is the following configuration: enabled """"""" -.. include:: partials/persistence_phpcr_enabled.rst.inc +.. include:: ../_partials/persistence_phpcr_enabled.rst.inc session_name """""""""""" diff --git a/bundles/tree_browser/index.rst b/bundles/tree_browser/index.rst index 89ab8da8..41dd48a9 100644 --- a/bundles/tree_browser/index.rst +++ b/bundles/tree_browser/index.rst @@ -5,3 +5,4 @@ TreeBrowserBundle :maxdepth: 2 introduction + configuration diff --git a/bundles/tree_browser/introduction.rst b/bundles/tree_browser/introduction.rst index 9a7c1b0d..c42cbb41 100644 --- a/bundles/tree_browser/introduction.rst +++ b/bundles/tree_browser/introduction.rst @@ -231,6 +231,11 @@ For example, if your want to open a custom action: This bundle automatically exposes routes with the FOSJsRoutingBundle_ to allow the tree to work. +Read On +------- + +* :doc:`configuration` + .. _`Packagist`: https://packagist.org/packages/symfony-cmf/tree-browser-bundle .. _`with composer`: http://getcomposer.org .. _`FOSJsRoutingBundle`: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle diff --git a/cookbook/editions/cmf_core.rst b/cookbook/editions/cmf_core.rst index 6afc18b3..8680caf0 100644 --- a/cookbook/editions/cmf_core.rst +++ b/cookbook/editions/cmf_core.rst @@ -156,7 +156,6 @@ If you want to support multiple languages, have a look at :doc:`../../book/handling_multilang`. Then have a look at the individual :doc:`bundles <../../bundles/index>` you are -interested in, and find the details on the configuration in the -:doc:`bundles configuration reference <../../reference/index>`. +interested in. .. _`Installation of Symfony2`: http://symfony.com/doc/current/book/installation.html diff --git a/cookbook/index.rst b/cookbook/index.rst index 55ea4b4e..260f09e2 100644 --- a/cookbook/index.rst +++ b/cookbook/index.rst @@ -4,7 +4,6 @@ The Cookbook .. toctree:: :hidden: - creating_a_cms/index database/choosing_storage_layer database/choosing_phpcr_implementation database/running_jackrabbit @@ -12,6 +11,5 @@ The Cookbook database/create_new_project_phpcr_odm editions/cmf_sandbox editions/cmf_core - exposing_content_via_rest .. include:: map.rst.inc diff --git a/cookbook/map.rst.inc b/cookbook/map.rst.inc index 82265ff2..76980f80 100644 --- a/cookbook/map.rst.inc +++ b/cookbook/map.rst.inc @@ -11,6 +11,3 @@ * :doc:`Installing the CMF Standard Edition <../book/installation>` (in the book) * :doc:`editions/cmf_sandbox` * :doc:`editions/cmf_core` - -* :doc:`creating_a_cms/index` -* :doc:`exposing_content_via_rest` diff --git a/index.rst b/index.rst index 3180205a..7571b9b0 100644 --- a/index.rst +++ b/index.rst @@ -5,13 +5,6 @@ The Symfony2 Content Management Framework (CMF) project is organized by the Symf community and has several sponsoring companies and prominent open source leaders implementing the philosophy of the `decoupled CMS`_. -.. caution:: - - This documentation is still in development. The bundles and reference sections - are updated for the 1.1 release, but the book is still a bit sparse. Want to - help? Thank you, all help greatly appreciated! The source of the - `documentation is hosted on github`_. - .. toctree:: :hidden: @@ -20,8 +13,8 @@ implementing the philosophy of the `decoupled CMS`_. bundles/index components/index contributing/index - reference/index cookbook/index + tutorial/index Quick Tour ---------- @@ -54,6 +47,24 @@ will typically want to keep this close at hand. book/static_content book/structuring_content +Tutorial +-------- + +The tutorial guides you through all features of the CMF. It uses a step-by-step +way to create a complete website build from the ground up with the CMF. + +.. toctree:: + :maxdepth: 1 + + tutorial/introduction + tutorial/getting-started + tutorial/auto-routing + tutorial/sonata-admin + tutorial/content-to-controllers + tutorial/the-frontend + tutorial/make-homepage + tutorial/conclusion + Bundles ------- @@ -72,15 +83,6 @@ project, even when they are not using Symfony. :doc:`Browse the components ` -Reference ---------- - -Ever wondered what configuration options you have available to you in files -such as ``app/config/config.yml``? In this section, all available -configuration is broken down per bundle. - -:doc:`Browse the reference ` - Cookbook -------- diff --git a/reference/index.rst b/reference/index.rst deleted file mode 100644 index 78fbd819..00000000 --- a/reference/index.rst +++ /dev/null @@ -1,20 +0,0 @@ -Reference -========= - -.. toctree:: - :hidden: - - configuration/block - configuration/content - configuration/core - configuration/create - configuration/media - configuration/menu - configuration/routing - configuration/search - configuration/seo - configuration/simple_cms - configuration/tree_browser - configuration/phpcr_odm - -.. include:: map.rst.inc diff --git a/reference/map.rst.inc b/reference/map.rst.inc deleted file mode 100644 index 463bc2f1..00000000 --- a/reference/map.rst.inc +++ /dev/null @@ -1,14 +0,0 @@ -* **Configuration** - - * :doc:`configuration/block` - * :doc:`configuration/content` - * :doc:`configuration/core` - * :doc:`configuration/create` - * :doc:`configuration/media` - * :doc:`configuration/menu` - * :doc:`configuration/routing` - * :doc:`configuration/search` - * :doc:`configuration/seo` - * :doc:`configuration/simple_cms` - * :doc:`configuration/tree_browser` - * :doc:`configuration/phpcr_odm` diff --git a/cookbook/creating_a_cms/auto-routing.rst b/tutorial/auto-routing.rst similarity index 69% rename from cookbook/creating_a_cms/auto-routing.rst rename to tutorial/auto-routing.rst index b6caef3c..61ce7203 100644 --- a/cookbook/creating_a_cms/auto-routing.rst +++ b/tutorial/auto-routing.rst @@ -1,5 +1,5 @@ Routing and Automatic Routing ------------------------------ +============================= The routes (URIs) to your content will be automatically created and updated using the RoutingAutoBundle. This bundle uses a configuration language to @@ -7,13 +7,13 @@ specify automatic creation of routes, which can be a bit hard to grasp the first time you see it. For a full explanation refer to the -:doc:`../../bundles/routing_auto/index`. +:doc:`RoutingAutoBundle <../bundles/routing_auto/introduction>`. In summary, you will configure the auto routing system to create a new auto routing document in the routing tree for every post or content created. The new route will be linked back to the target content: -.. image:: ../../_images/cookbook/basic-cms-objects.png +.. image:: ../_images/cookbook/basic-cms-objects.png The paths above represent the path in the PHPCR-ODM document tree. In the next section you will define ``/cms/routes`` as the base path for routes, and subsequently @@ -24,10 +24,10 @@ the contents will be available at the following URIs: * etc. Installation -~~~~~~~~~~~~ +------------ -Ensure that you installed the RoutingAutoBundle package as detailed in the :ref:`gettingstarted_installadditionbundles` -section. +Ensure that you installed the RoutingAutoBundle package as detailed in the +:ref:`gettingstarted_installadditionbundles` section. Enable the routing bundles to your kernel:: @@ -51,7 +51,7 @@ Enable the routing bundles to your kernel:: `symfony-cmf/routing-auto-bundle` depends on it. Enable the Dynamic Router -~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------- The RoutingAutoBundle uses the CMF `RoutingBundle`_ which enables routes to be provided from a database (in addition to being provided from @@ -119,41 +119,91 @@ This will: can be found at ``/cms/routes``. Auto Routing Configuration -~~~~~~~~~~~~~~~~~~~~~~~~~~ +-------------------------- First you need to configure the auto routing bundle: -.. code-block:: yaml +.. configuration-block:: + + .. code-block:: yaml + + # app/config/config.yml + cmf_routing_auto: + persistence: + phpcr: + enabled: true + + .. code-block:: xml + + + + + + + + + + + .. code-block:: php + + // app/config/config.php + $container->loadFromExtension('cmf_routing_auto', array( + 'persistence' => array( + 'phpcr' => array( + 'enabled' => true, + ), + ), + )); - cmf_routing_auto: - persistence: - phpcr: - enabled: true The above configures the RoutingAutoBundle to work with PHPCR-ODM. You can now proceed to mapping your documents, create the following in your *bundles* configuration directory: -.. code-block:: yaml +.. configuration-block:: + + .. code-block:: yaml + + # src/Acme/BasicCmsBundle/Resources/config/cmf_routing_auto.yml + Acme\BasicCmsBundle\Document\Page: + uri_schema: /page/{title} + token_providers: + title: [content_method, { method: getTitle }] + + Acme\BasicCmsBundle\Document\Post: + uri_schema: /post/{date}/{title} + token_providers: + date: [content_datetime, { method: getDate }] + title: [content_method, { method: getTitle }] + + .. code-block:: xml + + + + + + + + + - # src/Acme/BasicCmsBundle/Resources/config/cmf_routing_auto.yml - Acme\BasicCmsBundle\Document\Page: - uri_schema: /page/{title} - token_providers: - title: [content_method, { method: getTitle } ] + - Acme\BasicCmsBundle\Document\Post: - uri_schema: /post/{date}/{title} - token_providers: - date: [content_datetime, { method: getDate } - title: [content_method, { method: getTitle }] + + + + + .. note:: RoutingAutoBundle mapping bundles are registered automatically when they are named as above, you may alternatively explicitly declare from where the mappings should be loaded, - see the :doc:`../../bundles/routing_auto/index` documentation for more information. + see the :doc:`../bundles/routing_auto/introduction` documentation for more information. This will configure the routing auto system to automatically create and update route documents for both the ``Page`` and ``Post`` documents. diff --git a/cookbook/creating_a_cms/conclusion.rst b/tutorial/conclusion.rst similarity index 95% rename from cookbook/creating_a_cms/conclusion.rst rename to tutorial/conclusion.rst index ded073ff..99c420b7 100644 --- a/cookbook/creating_a_cms/conclusion.rst +++ b/tutorial/conclusion.rst @@ -1,5 +1,5 @@ Conclusion ----------- +========== And thats it! Well done. You have created a very minimum but functional CMS which can act as a good foundation for larger projects! diff --git a/cookbook/creating_a_cms/content-to-controllers.rst b/tutorial/content-to-controllers.rst similarity index 93% rename from cookbook/creating_a_cms/content-to-controllers.rst rename to tutorial/content-to-controllers.rst index 8dd51869..53a3ac5d 100644 --- a/cookbook/creating_a_cms/content-to-controllers.rst +++ b/tutorial/content-to-controllers.rst @@ -1,15 +1,15 @@ Controllers and Templates -------------------------- +========================= Make your content route aware -............................. +----------------------------- -In the :doc:`getting-started` section you defined your `Post` and `Page` documents as -implementing the `RoutesReferrersReadInterface`. This interface enables the routing system +In the :doc:`getting-started` section, you defined your `Post` and `Page` documents as +implementing the ``RoutesReferrersReadInterface``. This interface enables the routing system to retrieve routes which refer to the object implementing this interface, and this enables the system to generate a URL (for example when you use ``{{ path(mydocument) }}`` in Twig). -Earlier we did not have the RoutingBundle installed, so we could not add the mapping. +Earlier you did not have the RoutingBundle installed, so you could not add the mapping. Map the ``$routes`` property to contain a collection of all the routes which refer to this document:: @@ -17,7 +17,6 @@ document:: // src/AcmeBundle/BasicCmsBundle/Document/ContentTrait.php // ... - trait ContentTrait { // ... @@ -36,8 +35,8 @@ document:: Now you can call the method ``getRoutes`` on either ``Page`` or ``Post`` and retrieve all the routes which refer to that document ... pretty cool! -Route requests to a controller -.............................. +Route Requests to a Controller +------------------------------ Go to the URL http://127.0.0.1:8000/page/home in your browser - this should be your page, but it says that it cannot find a controller. In other words it has diff --git a/cookbook/creating_a_cms/getting-started.rst b/tutorial/getting-started.rst similarity index 96% rename from cookbook/creating_a_cms/getting-started.rst rename to tutorial/getting-started.rst index 4268cb75..7d5ee454 100644 --- a/cookbook/creating_a_cms/getting-started.rst +++ b/tutorial/getting-started.rst @@ -1,16 +1,16 @@ Getting Started ---------------- +=============== Initializing the Project -~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------ -First, follow the generic steps in :doc:`../database/create_new_project_phpcr_odm` +First, follow the generic steps in :doc:`../cookbook/database/create_new_project_phpcr_odm` to create a new project using the PHPCR-ODM. .. _gettingstarted_installadditionbundles: Install Additional Bundles -.......................... +~~~~~~~~~~~~~~~~~~~~~~~~~~ The complete tutorial requires the following packages: @@ -59,12 +59,11 @@ Note that each time you modify your ``composer.json`` file you are required to run ``composer update``. Initialize the Database -....................... +~~~~~~~~~~~~~~~~~~~~~~~ -If you have followed the main instructions in -:doc:`../../bundles/phpcr_odm/introduction` then you are using the -`Doctrine DBAL Jackalope`_ PHPCR backend with MySQL and you will need to -create the database: +If you have followed the main instructions in :doc:`../bundles/phpcr_odm/introduction` +then you are using the `Doctrine DBAL Jackalope`_ PHPCR backend with MySQL and +you will need to create the database: .. code-block:: bash @@ -318,7 +317,7 @@ configuration: The initializers operate at the PHPCR level, not the PHPCR-ODM level - this means that you are dealing with nodes and not documents. You do not have to understand these details right now. To learn more about PHPCR read - :doc:`../database/choosing_storage_layer`. + :doc:`../cookbook/database/choosing_storage_layer`. The initalizers will be executed automatically when you load your data fixtures (as detailed in the next section) or alternatively you can execute diff --git a/cookbook/creating_a_cms/index.rst b/tutorial/index.rst similarity index 100% rename from cookbook/creating_a_cms/index.rst rename to tutorial/index.rst diff --git a/cookbook/creating_a_cms/introduction.rst b/tutorial/introduction.rst similarity index 84% rename from cookbook/creating_a_cms/introduction.rst rename to tutorial/introduction.rst index b342d3f9..b2a23af2 100644 --- a/cookbook/creating_a_cms/introduction.rst +++ b/tutorial/introduction.rst @@ -8,9 +8,9 @@ Creating a Basic CMS using the RoutingAutoBundle This series of articles will show you how to create a basic CMS from scratch using the following bundles: -* :doc:`../../bundles/routing_auto/index`; -* :doc:`../../bundles/phpcr_odm/index`; -* :doc:`../../bundles/menu/index`; +* :doc:`../bundles/routing_auto/introduction`; +* :doc:`../bundles/phpcr_odm/introduction`; +* :doc:`../bundles/menu/introduction`; * SonataDoctrinePHPCRAdminBundle_. It is assumed that you have: @@ -28,11 +28,11 @@ The auto routing integration will automatically create and update the routes post content documents. In addition each page content document will double up as a menu item. -.. image:: ../../_images/cookbook/basic-cms-intro-sketch.png +.. image:: ../_images/cookbook/basic-cms-intro-sketch.png .. note:: - There exists a bundle called :doc:`../../bundles/simple_cms/index` which + There exists a bundle called :doc:`../bundles/simple_cms/index` which provides a similar solution to the one proposed in this tutorial. It combines the route, menu and content into a single document and uses a custom router. The approach taken in this tutorial will combine only the menu diff --git a/cookbook/creating_a_cms/make-homepage.rst b/tutorial/make-homepage.rst similarity index 97% rename from cookbook/creating_a_cms/make-homepage.rst rename to tutorial/make-homepage.rst index 7b0672d7..6dea72b8 100644 --- a/cookbook/creating_a_cms/make-homepage.rst +++ b/tutorial/make-homepage.rst @@ -1,5 +1,5 @@ The Site Document and the Homepage ----------------------------------- +================================== All of your content should now be available at various URLs but your homepage (http://localhost:8000) still shows the default Symfony Standard Edition @@ -11,10 +11,10 @@ allows the user to mark a ``Page`` to act as the homepage of your CMS. .. note:: This is just one of many strategies for routing the homepage. For example, - another option would be put a `RedirectRoute` document at `/cms/routes`. + another option would be put a ``RedirectRoute`` document at ``/cms/routes``. Storing the Data -~~~~~~~~~~~~~~~~ +---------------- You need a document which can store data about your CMS - this will be known as the site document and it will contain a reference to the ``Page`` document @@ -59,7 +59,7 @@ Create the site document:: } Initializing the Site Document -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------ Where does the ``Site`` document belong? The document hierarchy currently looks like this: @@ -220,7 +220,7 @@ and verify that the ``cms`` node has been created correctly, using the initialization choices take place - do whatever you prefer. Create the Make Homepage Button -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +------------------------------- You will need a way to allow the administrator of your site to select which page should act as the homepage. You will modify the ``PageAdmin`` class so @@ -313,10 +313,10 @@ that it knows the edit page is requested, it retrieves the *subject* from the ad class which is the ``Page`` currently being edited, it then adds a menu item to the menu. -.. image:: ../../_images/cookbook/basic-cms-sonata-admin-make-homepage.png +.. image:: ../_images/cookbook/basic-cms-sonata-admin-make-homepage.png Routing the Homepage -~~~~~~~~~~~~~~~~~~~~ +-------------------- Now that you have enabled the administrator to designate a page to be used as a homepage you need to actually make the CMS use this information to render diff --git a/cookbook/creating_a_cms/sonata-admin.rst b/tutorial/sonata-admin.rst similarity index 99% rename from cookbook/creating_a_cms/sonata-admin.rst rename to tutorial/sonata-admin.rst index ed852482..39e61be9 100644 --- a/cookbook/creating_a_cms/sonata-admin.rst +++ b/tutorial/sonata-admin.rst @@ -1,11 +1,11 @@ The Backend - Sonata Admin --------------------------- +========================== In this chapter you will build an administration interface with the help of the SonataDoctrinePHPCRAdminBundle_. Installation -~~~~~~~~~~~~ +------------ Ensure that you installed the ``sonata-project/doctrine-phpcr-admin-bundle`` package as detailed in the :ref:`gettingstarted_installadditionbundles` @@ -32,7 +32,8 @@ Enable the Sonata related bundles to your kernel:: } } -Sonata requires the ``sonata_block`` bundle to be configured in your main configuration: +Sonata requires the ``sonata_block`` bundle to be configured in your main +configuration: .. configuration-block:: @@ -246,7 +247,7 @@ administrator. You can disable the RoutingBundle admin: prevents the admin class (or classes) from being registered. Creating the Admin Classes -~~~~~~~~~~~~~~~~~~~~~~~~~~ +-------------------------- Create the following admin classes, first for the ``Page`` document:: @@ -445,10 +446,10 @@ container configuration: Check it out at http://localhost:8000/admin/dashboard -.. image:: ../../_images/cookbook/basic-cms-sonata-admin.png +.. image:: ../_images/cookbook/basic-cms-sonata-admin.png Configure the Admin Tree on the Dashboard -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +----------------------------------------- Sonata admin provides a useful tree view of your whole content. You can click items on the tree to edit them, right-click to delete them or add diff --git a/cookbook/creating_a_cms/the-frontend.rst b/tutorial/the-frontend.rst similarity index 96% rename from cookbook/creating_a_cms/the-frontend.rst rename to tutorial/the-frontend.rst index a5657241..b8fdc087 100644 --- a/cookbook/creating_a_cms/the-frontend.rst +++ b/tutorial/the-frontend.rst @@ -1,17 +1,18 @@ Creating a Menu ---------------- +=============== In this section you will modify your application so that ``Page`` documents act as menu nodes. The root page document can then be rendered using the Twig helper of the `KnpMenuBundle`_. Installation -............ +------------ -Ensure that you installed the ``symfony-cmf/menu-bundle`` package as detailed in the :ref:`gettingstarted_installadditionbundles` -section. +Ensure that you installed the ``symfony-cmf/menu-bundle`` package as detailed +in the :ref:`gettingstarted_installadditionbundles` section. -Add the CMF `MenuBundle`_ and its dependency, `CoreBundle`_, to your kernel:: +Add the CMF :doc:`MenuBundle <../bundles/menu/introduction>` and its +dependency, :doc:`CoreBundle <../bundles/core/introduction>`, to your kernel:: // app/AppKernel.php class AppKernel extends Kernel @@ -30,7 +31,7 @@ Add the CMF `MenuBundle`_ and its dependency, `CoreBundle`_, to your kernel:: } Modify the Page Document -........................ +------------------------ The menu document has to implement the ``Knp\Menu\NodeInterface`` provided by the KnpMenuBundle:: @@ -100,7 +101,7 @@ The attributes apply to the HTML elements. See the `KnpMenu`_ documentation for more information. Modify the Data Fixtures -........................ +------------------------ The menu system expects to be able to find a root item which contains the first level of child items. Modify your fixtures to declare a root element @@ -148,7 +149,7 @@ Load the fixtures again: $ php app/console doctrine:phpcr:fixtures:load Register the Menu Provider -.......................... +-------------------------- Now you can register the ``PhpcrMenuProvider`` from the menu bundle in the service container configuration: