Editables
The editables are placeholders in the templates, which are displayed as input widgets in the admin interface (so called editmode) and output the content in frontend mode. They are the essential part of managing content in documents.
Example Usage
The following code makes the <h1>
headline editable in a document:
<h1>{{ pimcore_input("headline") }}</h1>
In some cases, especially with areablocks, editables could throw exceptions. Since Pimcore internally uses the __toString
method to render
the editables, Pimcore can't throw exceptions there. Therefore Pimcore catches the exception, and puts it out as string if DEBUG Mode is enabled.
To prevent that and to have Pimcore throw the Exception, you can call editables like:
<h1>{{ pimcore_input("headline").render() }}</h1>
Pimcore automatically displays an input widget in the edit mode and renders the content when accessing the document via the frontend.
List of Editables
Name | Description |
---|---|
Areablock | Areablock is the content construction kit which allows you to insert predefined mini applications / content blocks called bricks into an areablock.. |
Area | Area allows you to use area bricks of a certain type (just like the Areablock). |
Block | Block is a loop component which can contain other editables. |
Checkbox | Checkbox / bool implementation for documents. |
Date | Datepicker, showing the date in a specified format. |
Relation | Provides possibility to create a reference to any other element in Pimcore (document, asset, object). |
Relations (Many-To-Many Relation) | Provides possibility to edit multiple references to other elements in Pimcore (documents, assets, objects). |
Image | A place where you can assign an image (from the assets module). |
Input | A single-line text-input. |
Link | An editable link component. |
Multiselect | Multiselect implementation for documents. |
Numeric | The numeric editable is like the input editable but with special options for numbers (like minimum value, decimal precision...). |
This editable allows you to embed asset documents (pdf, doc, xls, ...) into documents (like video, image, ...). | |
Renderlet | The renderlet is a special container which is able to handle every object in Pimcore (Documents, Assets, Objects). |
Select | Select box as an editable. |
Snippet (embed) | Use the snippet editable to embed a reusable document, for example to create teasers, boxes, etc. |
Table | This editable allows you to add a fully editable table. |
Textarea | Textarea implementation for documents. |
Video | Use the Video editable to insert asset movies in pages content. |
WYSIWYG | WYSIWYG editor. |
Scheduled Block | Scheduled Blocks allow to schedule content for certain timestamps |