44The Big Picture
55===============
66
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
88the base concepts of the Symfony CMF and get you started with it.
99
1010It'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
1313of the Symfony Framework. If you don't know Symfony, start by reading the
1414`Symfony Framework Quick Tour `_.
1515
16- Solving the framework versus CMS dilemma
16+ Solving the Framework versus CMS Dilemma
1717----------------------------------------
1818
1919Before starting a new project, there is a difficult decision on whether it
@@ -25,12 +25,12 @@ the core parts of the CMS.
2525
2626The CMF is created to solve this framework versus CMS dilemma. It provides
2727bundles, 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
2929build custom functionality the way you want. This is called a `decoupled CMS `_.
3030
3131The bundles provided by the Symfony CMF can work together, but they are also
3232able 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 ).
3434
3535Downloading the Symfony CMF Standard Edition
3636--------------------------------------------
@@ -45,16 +45,8 @@ The best way to download the Symfony CMF Standard Edition is using Composer_:
4545
4646.. code-block :: bash
4747
48- $ composer create-project symfony-cmf/standard-edition cmf ' 1.2.1 '
48+ $ composer create-project symfony-cmf/standard-edition cmf
4949
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-
5850 Setting up the Database
5951~~~~~~~~~~~~~~~~~~~~~~~
6052
@@ -63,14 +55,15 @@ something you are used to doing when creating Symfony applications, but the
6355Symfony CMF needs a database in order to make a lot of things configurable
6456using an admin interface.
6557
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
6759extension. After that, run these commands:
6860
6961.. code-block :: bash
7062
7163 $ php bin/console doctrine:database:create
72- $ php bin/console doctrine:phpcr:init:dbal
64+ $ php bin/console doctrine:phpcr:init:dbal --force
7365 $ php bin/console doctrine:phpcr:repository:init
66+ # TODO there are no fixtures in the standard edition anymore...
7467 $ php bin/console doctrine:phpcr:fixtures:load
7568
7669 .. tip ::
@@ -88,9 +81,11 @@ The Request Flow
8881
8982.. tip ::
9083
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/ ``.
84+ Use the ``server:run `` command to run a local server for the demo. If you
85+ use a web server like Nginx or Apache, you need to prefix the URLs
86+ in this document with ``app_dev.php/ `` (and the path to the ``web `` folder
87+ inside the Symfony project, if that is not already the root folder of your
88+ server).
9489
9590Now, the Standard Edition is ready to use. Navigate to the homepage
9691(``http://localhost:8000/ ``) to see the demo:
@@ -175,13 +170,15 @@ Adding a New Page
175170
176171Now you know the request flow, you can start adding a new page. In the Symfony
177172CMF 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:
173+ executing the ``doctrine:phpcr:fixtures:load `` command. To add a new page, edit
174+ one of the data files located in the
175+ ``src/AppBundle/Resources/data `` directory:
176+
177+ TODO: replace example, simplecms bundle is not maintained anymore
181178
182179.. code-block :: yaml
183180
184- # src/Acme/DemoBundle /Resources/data/pages.yml
181+ # src/AppBundle /Resources/data/pages.yml
185182 Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page :
186183 # ...
187184
@@ -196,28 +193,6 @@ the changes on the database and after refreshing, you can see your new page!
196193
197194.. image :: ../_images/quick_tour/big-picture-new-page.png
198195
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-
221196Final Thoughts
222197--------------
223198
0 commit comments