Skip to content

Commit

Permalink
Merge branch 'hotfix/nginx_sample' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Mar 15, 2015
2 parents 76e7bd2 + a917121 commit 5dff94d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
11 changes: 7 additions & 4 deletions forms/contact_forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
Building contact forms
======================

With Roadiz you can easily create simple contact forms with ``EntryPointsController::getContactFormBuilder`` method.
With Roadiz you can easily create simple contact forms with
`EntryPointsController::getContactFormBuilder <http://api.roadiz.io/RZ/Roadiz/CMS/Controllers/EntryPointsController.html#method_getContactFormBuilder>`_ method.
This will create a ``FormBuilder`` object which points to the Roadiz sendmail entrypoint. You just have to add your own
form inputs like the mandatory ``email`` input and assign it to be rendered by Twig.

Expand All @@ -19,7 +20,7 @@ Create your contact form in your controller action.
$formBuilder = EntryPointsController::getContactFormBuilder(
$request,
true
true // Force redirection after contact form submit
);
$formBuilder->add('email', 'email', array(
'label'=>$this->getTranslator()->trans('your.email')
Expand All @@ -40,9 +41,11 @@ Create your contact form in your controller action.
$form = $formBuilder->getForm();
$this->assignation['contactForm'] = $form->createView();
In this example, we used ``getContactFormBuilder`` method with *redirect* option to *true* (its second argument).
If you need to send your contact form using *Ajax* request, just set this argument to *false* and it will
return a ``JsonResponse`` instead of a ``RedirectResponse``.

Add session messages to your assignations
Add session messages to your assignations:

.. code-block:: php
Expand Down
16 changes: 8 additions & 8 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ First contact
-------------

.. toctree::
:maxdepth: 1
:maxdepth: 2

intro/getting_started
intro/manual_config
Expand All @@ -23,7 +23,7 @@ Node system
-----------

.. toctree::
:maxdepth: 1
:maxdepth: 2

nodes-system/intro
nodes-system/node_type_fields
Expand All @@ -32,7 +32,7 @@ Tag system
----------

.. toctree::
:maxdepth: 1
:maxdepth: 2

tags-system/intro

Expand All @@ -41,7 +41,7 @@ User system
-----------

.. toctree::
:maxdepth: 1
:maxdepth: 2

users/intro

Expand All @@ -50,7 +50,7 @@ Themes
------

.. toctree::
:maxdepth: 1
:maxdepth: 2

themes/create_theme
themes/using_twig
Expand All @@ -60,7 +60,7 @@ Forms
-----

.. toctree::
:maxdepth: 1
:maxdepth: 2

forms/contact_forms
forms/custom_forms
Expand All @@ -69,15 +69,15 @@ Services
--------

.. toctree::
:maxdepth: 1
:maxdepth: 2

services/intro

Extension system
----------------

.. toctree::
:maxdepth: 1
:maxdepth: 2

themes/extending_roadiz

Expand Down
12 changes: 11 additions & 1 deletion intro/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ CMS Structure
* ``conf/`` : Your setup configuration file(s) (this folder must be writable for PHP)
* ``files/`` : Documents and fonts files root (this folder must be writable for PHP)
* ``gen-src/`` : Generated PHP code for Doctrine and your Node-types entities (this folder must be writable for PHP)
* ``samples/`` : This folder contains useful configuration and example files for Apache or Nginx webservers
* ``src/`` : Roadiz CMS logic and core source code
* ``tests/`` : PHP Unit tests root
* ``themes/`` : Contains your themes and systems themes such as *Rozier* and *Install*
Expand All @@ -65,7 +66,7 @@ and SSH with out/ingoing allowed connections.

Here is a short summary of mandatory elements before installing Roadiz:

* Nginx or Apache
* Nginx or Apache, with a dedicated virtual host as described below.
* PHP 5.4.3+
* ``php5-gd`` extension
* ``php5-intl`` extension
Expand All @@ -77,6 +78,12 @@ Here is a short summary of mandatory elements before installing Roadiz:
* Composer
* Git

For Nginx users
^^^^^^^^^^^^^^^

If you are using Nginx, you don’t have to activate any extensions.
You only need to create your *virtual host* using our example file ``/samples/nginx.conf``.

For Apache users
^^^^^^^^^^^^^^^^

Expand All @@ -87,6 +94,9 @@ If you are using *Apache* do not forget to activate these mods:

And do not use built-in ``mod_php``, prefer *PHP-FPM* ;-)

Then use ``/samples/apache.conf`` template to create your *virtual host* configuration file. It shows how to set rewrite and
secure private folders from being view from public visitors.

Installation
------------

Expand Down

0 comments on commit 5dff94d

Please sign in to comment.