# Inhalte der Config im Template abfragen

**URL:** <https://forum.shopware.com/t/inhalte-der-config-im-template-abfragen/61716>\
**Category:** Programmierung\
**Created:** [12. September 2019 um 06:55 UTC](https://forum.shopware.com/t/inhalte-der-config-im-template-abfragen/61716 "2019-09-12T06:55:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [12. September 2019 um 06:55 UTC](https://forum.shopware.com/t/inhalte-der-config-im-template-abfragen/61716/1 "2019-09-12T06:55:13Z")

</div>

Ich versuche eben Inhalte meiner Config im Template abzufragen. Also gehe ich diesen Weg:

```
{{ if shopware.config.MeinPlugin.config.defaultImageGlobal }}
  ...
{% endif %}

```

Der Name “defaultImageGlobal” ist in der config.xml natürlich vorhanden und mit einem Link versehen. Allerdings kommt es zur Fehlermeldung:

```
Uncaught Twig\\Error\\SyntaxError: Unexpected token "name" of value "shopware" 
("end of print statement" expected)

```

Warum geht denn das nicht?

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [12. September 2019 um 07:11 UTC](https://forum.shopware.com/t/inhalte-der-config-im-template-abfragen/61716/2 "2019-09-12T07:11:10Z")

</div>

Hi,

du benutzt eine falsche Twig Syntax&nbsp;

```
{% if shopware.config.MeinPlugin.config.defaultImageGlobal %}
  ...
{% endif %}

```

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![R4M](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/r4m/32/9983_2.png) [@R4M](https://forum.shopware.com/u/R4M)\
**Post date:** [12. September 2019 um 07:12 UTC](https://forum.shopware.com/t/inhalte-der-config-im-template-abfragen/61716/3 "2019-09-12T07:12:58Z")

</div>

Oh Kacke, ich brauch Urlaub!
