=================================== Inline page editing =================================== Gerbi CMS provide a way to easily edit the placeholder's content on your own frontend when you are authenticated as a staff user. .. image:: images/inline-edit.png To activate the feature on your frontend you need to add 2 tags inside your templates. One in your tag and one in the tag: .. code-block:: html+django {% load pages_tags static i18n %} ... {% pages_edit_media %} ... {% pages_edit_init %} For placeholder editing to work properly you will need to surround the placeholder with an HTML element like so: .. code-block:: html+django
{% placeholder "title" %}
Placeholder editing works automatically by injecting an HTML comment into the placeholder output. So thing like this will not work: .. code-block:: html+django
Because the rendered comment will not result into an HTML node: .. code-block:: html+django
To fix this issue you can use placeholders as rendering blocks like so: .. code-block:: html+django
{% imageplaceholder 'img' block %} {% if content %} {% endif %} {% endplaceholder %}