@@ -54,23 +54,34 @@ See the section below for multilanguage support.
54
54
55
55
# app/config/config.yml
56
56
cmf_simple_cms :
57
- use_menu : auto # use true/false to force providing / not providing a menu
58
- use_sonata_admin : auto # use true/false to force using / not using sonata admin
59
- sonata_admin :
60
- sort : false # set to asc|desc to sort children by publication date
61
- document_class : Symfony\Cmf\Bundle\SimpleCmsBundle\Document\Page
62
- # controller to use to render documents with just custom template
63
- generic_controller : cmf_content.controller:indexAction
64
- # where in the PHPCR tree to store the pages
65
- basepath : /cms/simple
57
+ persistence :
58
+ phpcr :
59
+ enabled : ~
60
+ basepath : /cms/simple
61
+ manager_registry : doctrine_phpcr
62
+ manager_name : ~
63
+ document_class : Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page
64
+ use_sonata_admin : auto
65
+ sonata_admin :
66
+ sort : false
67
+ use_menu : auto
66
68
routing :
69
+ generic_controller : cmf_content.controller:indexAction
67
70
content_repository_id : cmf_routing.content_repository
71
+ uri_filter_regexp :
72
+ controllers_by_alias :
73
+
74
+ # Prototype
75
+ alias : []
68
76
controllers_by_class :
69
- # ...
77
+
78
+ # Prototype
79
+ alias : []
70
80
templates_by_class :
71
- # ...
72
- multilang :
73
- locales : []
81
+
82
+ # Prototype
83
+ alias : []
84
+
74
85
75
86
.. tip ::
76
87
@@ -83,40 +94,15 @@ See the section below for multilanguage support.
83
94
.. code-block :: yaml
84
95
85
96
cmf_simple_cms :
86
- use_sonata_admin : false
97
+ persistence :
98
+ phpcr :
99
+ sonata_admin : false
87
100
88
101
Multi-language support
89
102
----------------------
90
103
91
- The multi-language-mode is enabled by providing the list of allowed locales in
92
- the ``multilang > locales `` field.
93
-
94
- In multi-language-mode the Bundle will automatically use the
95
- ``Symfony\Cmf\Bundle\SimpleCmsBundle\Document\MultilangPage `` as the
96
- ``document_class `` unless a different class is configured explicitly.
97
-
98
- This class will by default prefix all routes with ``/{_locale} ``. This
99
- behavior can be disabled by setting the second parameter in the constructor of
100
- the model to false.
101
-
102
- Furthermore the routing layer will be configured to use
103
- ``Symfony\Cmf\Bundle\SimpleCmsBundle\Document\MultilangRouteRepository `` which
104
- will ensure that even with the locale prefix the right content node will be
105
- found. Furthermore it will automatically add a ``_locale `` requirement listing
106
- the current available locales for the matched route.
107
-
108
- .. note ::
109
-
110
- Since SimpleCmsBundle only provides a single tree structure, all nodes
111
- will have the same node name for all languages. So a url
112
- ``http://foo.com/en/bar `` for english content will look like
113
- ``http://foo.com/de/bar `` for german content. At times it might be most
114
- feasible to use integers as the node names and simple append the title of
115
- the node in the given locale as an anchor. So for example
116
- ``http://foo.com/de/1#my title `` and ``http://foo.com/de/1#mein title ``.
117
- If you need language specific URLs, you want to use the CMF routing bundle
118
- and content bundle directly to have a separate route document per
119
- language.
104
+ @todo: Explain how multilang works now, in particular the use of ``->addLocaleFormat `` on
105
+ the ``Page `` document.
120
106
121
107
Rendering
122
108
---------
@@ -157,7 +143,7 @@ chapter :doc:`create`.
157
143
Extending the Page class
158
144
------------------------
159
145
160
- The default Page document ``Symfony\Cmf\Bundle\SimpleCmsBundle\Document \Page ``
146
+ The default Page document ``Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr \Page ``
161
147
is relatively simple, shipping with a handful of the most common properties
162
148
for building a typical page: title, body, tags, publish dates etc.
163
149
@@ -171,9 +157,10 @@ configuration parameter to your own document class:
171
157
172
158
# app/config/config.yml
173
159
cmf_simple_cms :
174
- # ...
175
- document_class : Acme\DemoBundle\Document\MySuperPage
176
- # ...
160
+ persistence :
161
+ phpcr :
162
+ document_class : Acme\DemoBundle\Document\MySuperPage
163
+ # ...
177
164
178
165
Alternatively, the default Page document contains an ``extras `` property. This
179
166
is a key - value store (where value must be string or null) which can be used
0 commit comments