- Issue created by @elgandoz
- 🇫🇷France Quentin Harelle
At the moment I did not try to use slots in the .components.yml for the moment, but you should be able to access the data in your component anyway in theory.
I'll try to look into it when I'll have the time.
- 🇦🇺Australia elgandoz Canberra
I can access the examples of the slots, eg:
$pluginDefinition['slots'][$slot_name]['examples'][0]
, but ATM I don't know how to render twig blocks in dab/src/Controller/DabComponentController.php:$markup = $this->twig->renderInline($twigTemplate, $variables);
- 🇫🇷France Quentin Harelle
Hi elgandoz,
Sorry for the very long response time ...
I looked into it, and I was not working with the slots at all ...
If you still have the issue you can test it with the patch that I provide you and this working example to put in a component.yml file :
slots: test: description: 'The title content.' examples: - '<p>Title content</p>' - '<p>Another title <span>content</span></p><ul><li>Item 1</li><li>Item 2</li></ul>'
And in a twig file :
{% block test %} {{ test }} {% endblock %}
Theses examples will be converted into Markup and can then be printed into the twig template.