How to use Editables in twig?


I’m using twig for my templates but the editables are not shown in backend?

Code for example:

	{{ pimcore_input('title_test') }}

In backend no editable input field is shown - why?




you have to use the renderTemplate function in your controller in twig.



That’s it - thank you very much!



I know this is an old topic, but there is still some confusion for me.

I tried to achieve the same thing, but the editables won’t show up.

Do I need some special includes?

{{ pimcore_input('title_test') }}

The “title_test” is this a variable or just a dummy string?

Is this even possible, if you’re not on a document page? (E.g.: I wanna use it to create my own “New DataObject” Form)

Thank you for any help :slight_smile:


no, its not possible when you are not on a document. But: You can inherit editables. So, for example, you have a document /en/products and a route /en/products/product~1, you can inherit editable information from /en/products.


Inheritance is unfortunately not working for me.

{{ pimcore_input('copyright').setInherited(true) }} is providing “right click to overwrite” in the backend but no output at the frontend. Also the value is not shown in the backend.

Any ideas?


try it like this

{% set copyright = pimcore_input('copyright') %}
{% do copyright.setInherited(true) %}
{{ copyright|raw }}

Unfortunately this is also not working. I am using Pimcore V5.2.3.

Dump of copyright shows the Text on the parent but not on childs.



Search in DB will show only one entry in documents_elements named copyright.


does your /de/ueber-uns page use /de as content master document?


No, just the parent in the document tree.


Yeah, thats why its not working, there is no inheritance in the document tree


Ahhhhh, damn :cry: :slight_smile:
Then we will need to switch to a document property for that.

Thank you for clarifying!