4
4
The Big Picture
5
5
===============
6
6
7
- Start using the Symfony CMF in 10 minutes! This chapter will walk you through
7
+ Start using the Symfony CMF in 10 minutes! This quick tour will walk you through
8
8
the base concepts of the Symfony CMF and get you started with it.
9
9
10
10
It's important to know that the Symfony CMF is a collection of bundles which
@@ -13,7 +13,7 @@ Framework. Before you read further, you should at least have a basic knowledge
13
13
of the Symfony Framework. If you don't know Symfony, start by reading the
14
14
`Symfony Framework Quick Tour `_.
15
15
16
- Solving the framework versus CMS dilemma
16
+ Solving the Framework versus CMS Dilemma
17
17
----------------------------------------
18
18
19
19
Before starting a new project, there is a difficult decision on whether it
@@ -25,12 +25,12 @@ the core parts of the CMS.
25
25
26
26
The CMF is created to solve this framework versus CMS dilemma. It provides
27
27
bundles, so you can easily add CMS features to your project. But it also
28
- provides flexibility and in all cases you are using the framework, so you can
28
+ provides flexibility and you can use the underlying Symfony framework to
29
29
build custom functionality the way you want. This is called a `decoupled CMS `_.
30
30
31
31
The bundles provided by the Symfony CMF can work together, but they are also
32
32
able to work standalone. This means that you don't need to add all bundles, you
33
- can decide to only use one of them (e.g. only the RoutingBundle or the MediaBundle ).
33
+ can decide to only use one of them (e.g. only the RoutingBundle or the SeoBundle ).
34
34
35
35
Downloading the Symfony CMF Standard Edition
36
36
--------------------------------------------
@@ -45,16 +45,8 @@ The best way to download the Symfony CMF Standard Edition is using Composer_:
45
45
46
46
.. code-block :: bash
47
47
48
- $ composer create-project symfony-cmf/standard-edition cmf ' 1.2.1 '
48
+ $ composer create-project symfony-cmf/standard-edition cmf
49
49
50
- .. note ::
51
-
52
- The `AcmeDemoBundle ` that is used in this tour was removed in
53
- version 1.3 of the Symfony CMF Standard Edition. Since then it has
54
- become the skeleton for a simple CMS application. This is why we
55
- install version 1.2.1. If you insist on checking out the most
56
- recent versions of the CMF, check out `symfony-cmf/cmf-sandbox `.
57
-
58
50
Setting up the Database
59
51
~~~~~~~~~~~~~~~~~~~~~~~
60
52
@@ -63,7 +55,7 @@ something you are used to doing when creating Symfony applications, but the
63
55
Symfony CMF needs a database in order to make a lot of things configurable
64
56
using an admin interface.
65
57
66
- To quickly get started, it is expected that you have enabled the sqlite
58
+ To quickly get started, it is expected that you have enabled the sqlite PHP
67
59
extension. After that, run these commands:
68
60
69
61
.. code-block :: bash
@@ -88,9 +80,11 @@ The Request Flow
88
80
89
81
.. tip ::
90
82
91
- When you have at least PHP 5.4, use the ``server:run `` command to run a
92
- local server for the demo. Otherwise, use a ``localhost `` and prefix the URLs
93
- in this document with ``/path-to-project/web/app_dev.php/ ``.
83
+ Use the ``server:run `` command to run a local server for the demo. If you
84
+ use a web server like Nginx or Apache, you need to prefix the URLs
85
+ in this document with ``app_dev.php/ `` (and the path to the ``web `` folder
86
+ inside the Symfony project, if that is not already the root folder of your
87
+ server).
94
88
95
89
Now, the Standard Edition is ready to use. Navigate to the homepage
96
90
(``http://localhost:8000/ ``) to see the demo:
@@ -175,13 +169,15 @@ Adding a New Page
175
169
176
170
Now you know the request flow, you can start adding a new page. In the Symfony
177
171
CMF Standard Edition, the data is stored in data files, which are loaded when
178
- executing the ``doctrine:phpcr:fixtures:load `` command. To add a new page, you
179
- just need to edit such a data file, which is located in the
180
- ``src/Acme/DemoBundle/Resources/data `` directory:
172
+ executing the ``doctrine:phpcr:fixtures:load `` command. To add a new page, edit
173
+ one of the data files located in the
174
+ ``src/AppBundle/Resources/data `` directory:
175
+
176
+ TODO: replace example, simplecms bundle is not maintained anymore
181
177
182
178
.. code-block :: yaml
183
179
184
- # src/Acme/DemoBundle /Resources/data/pages.yml
180
+ # src/AppBundle /Resources/data/pages.yml
185
181
Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page :
186
182
# ...
187
183
@@ -196,28 +192,6 @@ the changes on the database and after refreshing, you can see your new page!
196
192
197
193
.. image :: ../_images/quick_tour/big-picture-new-page.png
198
194
199
- Live Editing
200
- ------------
201
-
202
- Now is the time you become an admin of this site and editing the content using
203
- the Web Interface. To do this click on "Admin Login" and use the provided
204
- credentials.
205
-
206
- You'll see that you have a new bar at the top of the page:
207
-
208
- .. image :: ../_images/quick_tour/big-picture-createjs-bar.png
209
-
210
- This bar is generated by the `Create.js `_ library. The Symfony CMF integrates
211
- the CreatePHP _ and `Create.js `_ libraries using a CreateBundle. This enables
212
- you to edit a page using a full WYSIWYG editor when you are reading the page.
213
-
214
- Now you can change the content of our new page using Create.js:
215
-
216
- .. image :: ../_images/quick_tour/big-picture-edit-page.png
217
-
218
- After clicking "save", the changes are saved using the CreateBundle and the
219
- content is updated.
220
-
221
195
Final Thoughts
222
196
--------------
223
197
0 commit comments