Browse files

fixing lots of code block starts

  • Loading branch information...
1 parent d47faf2 commit a9aa76907f1e5b1ffa487b36a9f55a0a8d87b25a @dbu dbu committed Oct 16, 2012
View
2 reference/create.rst
@@ -315,7 +315,7 @@ compiled and the coffee compiler needs to be installed. If you set it to
anything else like ``\.nocoffee`` then you do not need the coffee compiler
installed.
-The default values for the three parameters are::
+The default values for the three parameters are
.. configuration-block::
View
4 reference/multilang.rst
@@ -55,7 +55,7 @@ You can render a language selection list in your templates using the language
selector controller. The idea is to have links to all language versions of the
current page.
-::
+.. code-block:: jinja
{% render "symfony_cmf_multilang_content.languageSelectorController:languagesAction"
with {"id" : page.path, "languageUrls": languageUrls|default(false) } %}
@@ -80,7 +80,7 @@ This route will make the DoctrineRouter::generate() get all child routes.
``generate`` then chooses the route with the best available locale.
MultilangLanguageSelectRoute by default specifies the explicit controller
-::
+.. code-block:: jinja
symfony_cmf_multilang_content.languageSelectorController:defaultLanguageAction
View
2 reference/phpcr-odm.rst
@@ -23,7 +23,7 @@ See :doc:`/tutorials/installing-configuring-doctrine-phpcr-odm`
Configuration
-------------
-.. tip::
+.. 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
View
44 reference/routing-extra.rst
@@ -47,7 +47,7 @@ routers_by_id list, you need to have an entry for ``router.default`` if you
want the Symfony2 router (that reads the routes from app/config/routing.yml).
The format is ``service_name: priority`` - the higher the priority number the
-earlier this router service is asked to match a route or to generate a url::
+earlier this router service is asked to match a route or to generate a url
.. configuration-block::
@@ -73,12 +73,24 @@ Your routers can automatically register, just add it as a service tagged with `r
The higher the priority, the earlier your router will be asked to match the route. If you do not specify the priority,
your router will come last.
If there are several routers with the same priority, the order between them is undetermined.
-The tagged service will look like this::
+The tagged service will look like this
- <service id="my_namespace.my_router" class="%my_namespace.my_router_class%">
- <tag name="router" priority="300" />
- ..
- </service>
+.. configuration-block::
+
+ .. code-block:: yaml
+
+ services:
+ my_namespace.my_router:
+ class: %my_namespace.my_router_class%
+ tags:
+ - { name: router, priority: 300 }
+
+ .. code-block:: xml
+
+ <service id="my_namespace.my_router" class="%my_namespace.my_router_class%">
+ <tag name="router" priority="300" />
+ ..
+ </service>
See also official Symfony2 `documentation for DependencyInjection tags`_
@@ -104,7 +116,7 @@ The minimum configuration required to load the dynamic router as service
your config.yml (the router is automatically enabled as soon as you add any
other configuration to the `dynamic` entry). Without enabling it, the dynamic
router service will not be loaded at all, allowing you to use the ChainRouter
-with your own routers::
+with your own routers
.. configuration-block::
@@ -167,11 +179,10 @@ The possible mappings are (in order of precedence):
class names in the map and if matched that template will be set as
'_template' in the $defaults and return the configured generic controller
-::
-
.. configuration-block::
.. code-block:: yaml
+
# app/config/config.yml
symfony_cmf_routing_extra:
dynamic:
@@ -201,13 +212,17 @@ To see some examples, please look at the `CMF sandbox`_ and specifically the rou
Form Type
---------
-The bundle defines a form type that can be used for classical "accept terms" checkboxes where you place urls in the label. Simply
-specify `symfony_cmf_routing_extra_terms_form_type` as the form type name and specify a label and an array with content_ids in the options::
+The bundle defines a form type that can be used for classical "accept terms"
+checkboxes where you place urls in the label. Simply specify
+`symfony_cmf_routing_extra_terms_form_type` as the form type name and specify a
+label and an array with content_ids in the options
- add('terms', 'symfony_cmf_routing_extra_terms_form_type', array(
+.. code-block:: php
+
+ $form->add('terms', 'symfony_cmf_routing_extra_terms_form_type', array(
'label' => 'I have seen the <a href="%team%">Team</a> and <a href="%more%">More</a> pages ...',
'content_ids' => array('%team%' => '/cms/content/static/team', '%more%' => '/cms/content/static/more')
- ))
+ ));
The form type automatically generates the routes for the specified content and passes the routes to the trans twig helper for replacement
in the label.
@@ -225,11 +240,12 @@ Notes:
TODO: see DependencyInjection/Configuration.php of this bundle. I could not figure out how to set
this mapping as a default mapping. Meanwhile, in order to do redirections, you
-need to add an entry to your mapping in config.yml::
+need to add an entry to your mapping in the project configuration
.. configuration-block::
.. code-block:: yaml
+
# app/config/config.yml
symfony_cmf_routing_extra:
controllers_by_class:
View
12 tutorials/creating-cms-using-cmf-and-sonata.rst
@@ -21,7 +21,7 @@ Installation
Download the bundles
~~~~~~~~~~~~~~~~~~~~
-Add the following to your ``composer.json`` file::
+Add the following to your ``composer.json`` file
.. code-block:: javascript
@@ -30,13 +30,15 @@ Add the following to your ``composer.json`` file::
"sonata-project/doctrine-phpcr-admin-bundle": "1.0.*",
}
-And then run::
+And then run
+
+.. code-block:: bash
php composer.phar update
Initialize bundles
~~~~~~~~~~~~~~~~~~
-Next, initialize the bundles in ``app/AppKernel.php`` by adding them to the ``registerBundle`` method::
+Next, initialize the bundles in ``app/AppKernel.php`` by adding them to the ``registerBundle`` method
.. code-block:: php
@@ -59,7 +61,7 @@ Next, initialize the bundles in ``app/AppKernel.php`` by adding them to the ``re
Configuration
-------------
-Add the sonata bundles to your application configuration ::
+Add the sonata bundles to your application configuration
.. configuration-block::
@@ -139,7 +141,7 @@ Add the sonata bundles to your application configuration ::
- sonata.admin.doctrine_phpcr.phpcrodm_children
- sonata.admin.doctrine_phpcr.phpcrodm_move
-Add route in to your routing configuration ::
+Add route in to your routing configuration
.. configuration-block::
View
15 tutorials/installing-configuring-cmf.rst
@@ -80,7 +80,8 @@ To get your application running very little configuration is needed. But because
SymfonyCmfMenuBundle is dependent of the doctrine router you need to explicitly enable
the doctrine router as per default it is not loaded.
-To enable the dynamic router and to add the router to the routing chain add the following to ``app/config/config.yml``::
+To enable the dynamic router and to add the router to the routing chain add the
+following to your project configuration
.. configuration-block::
@@ -98,7 +99,7 @@ To enable the dynamic router and to add the router to the routing chain add the
You might want to configure more on the dynamic router, i.e. to automatically choose controllers based on content.
See :doc:`/reference/routing-extra`
-For a basic functionality for the BlockBundle (required)::
+For a basic functionality for the BlockBundle (required)
.. configuration-block::
@@ -108,16 +109,6 @@ For a basic functionality for the BlockBundle (required)::
sonata_block:
default_contexts: [cms]
-If you are *NOT* using `SonataAdminBundle <https://github.com/sonata-project/SonataAdminBundle>`_ the following configuration is needed::
-
-.. configuration-block::
-
- .. code-block:: yaml
-
- # app/config/config.yml
- symfony_cmf_menu:
- use_sonata_admin: false
-
For now this is the only configuration we need. Mastering the configuration of the different
bundles will be handled in further tutorials. If you're looking for the configuration of a
specific bundle take a look at the corresponding :doc:`reference entry</index>`.
View
28 tutorials/installing-configuring-doctrine-phpcr-odm.rst
@@ -43,7 +43,7 @@ Depending on your choice you can omit certain steps in the following documentati
Download the bundles
~~~~~~~~~~~~~~~~~~~~
-Add the following to your ``composer.json`` file::
+Add the following to your ``composer.json`` file
.. code-block:: javascript
@@ -56,15 +56,22 @@ Add the following to your ``composer.json`` file::
"doctrine/phpcr-odm": "1.0.*",
}
-Notice: Remember to check if you are using "doctrine/orm": "2.2.*" (Symfony 2.1 default) and switch to "2.3.*" before updating.
+.. Note::
-And then run::
+ Remember to check if you are using "doctrine/orm": "2.2.*" (Symfony 2.1
+ default) and switch to "2.3.*" before updating.
+
+And then run
+
+.. code-block:: bash
php composer.phar update
+
Register annotations
~~~~~~~~~~~~~~~~~~~~
-Add file to annotation registry in ``app/autoload.php`` for the ODM annotations right after the last ``AnnotationRegistry::registerFile`` line::
+Add file to annotation registry in ``app/autoload.php`` for the ODM annotations
+right after the last ``AnnotationRegistry::registerFile`` line
.. code-block:: php
@@ -74,7 +81,8 @@ Add file to annotation registry in ``app/autoload.php`` for the ODM annotations
Initialize bundles
~~~~~~~~~~~~~~~~~~
-Next, initialize the bundles in ``app/AppKernel.php`` by adding them to the ``registerBundle`` method::
+Next, initialize the bundles in ``app/AppKernel.php`` by adding them to the
+``registerBundle`` method
.. code-block:: php
@@ -98,7 +106,7 @@ Next step is to configure the bundles.
Doctrine PHPCR ODM
~~~~~~~~~~~~~~~~~~
-Basic configuration, add to your application configuration::
+Basic configuration, add to your application configuration
.. configuration-block::
@@ -128,7 +136,8 @@ Basic configuration, add to your application configuration::
username: admin
password: admin
-More information on configuring this bundle can be found `here <https://github.com/doctrine/DoctrinePHPCRBundle#readme>`_.
+More information on configuring this bundle can be found
+`here <https://github.com/doctrine/DoctrinePHPCRBundle#readme>`_.
Setting up the content repository
---------------------------------
@@ -143,9 +152,10 @@ Jackalope Jackrabbit
These are the steps necessary to install Apache Jackrabbit:
-- Make sure you have Java Virtual Machine installed on your box. If not, you can grab one from here: http://www.java.com/en/download/manual.jsp
+- Make sure you have Java Virtual Machine installed on your box. If not, you can
+ grab one from here: http://www.java.com/en/download/manual.jsp
- Download the latest version from the `Jackrabbit Downloads page <http://jackrabbit.apache.org/downloads.html>`_
-- Run the server. Go to the folder where you downloaded the .jar file and launch it::
+- Run the server. Go to the folder where you downloaded the .jar file and launch it
.. code-block:: bash
View
8 tutorials/installing-configuring-inline-editing.rst
@@ -15,7 +15,7 @@ Installation
Download the bundles
~~~~~~~~~~~~~~~~~~~~
-Add the following to your ``composer.json`` file::
+Add the following to your ``composer.json`` file
.. code-block:: javascript
@@ -34,15 +34,15 @@ Add the following to your ``composer.json`` file::
]
},
-And then run::
+And then run
.. code-block:: bash
php composer.phar update
Initialize bundles
~~~~~~~~~~~~~~~~~~
-Next, initialize the bundles in ``app/AppKernel.php`` by adding them to the ``registerBundle`` method::
+Next, initialize the bundles in ``app/AppKernel.php`` by adding them to the ``registerBundle`` method
.. code-block:: php
@@ -63,7 +63,7 @@ Configuration
-------------
Next step is to configure the bundles.
-Basic configuration, add to your application configuration::
+Basic configuration, add to your application configuration
.. configuration-block::

0 comments on commit a9aa769

Please sign in to comment.