# Per Plugin Template manipulieren

**URL:** <https://forum.shopware.com/t/per-plugin-template-manipulieren/93586>\
**Category:** Programmierung\
**Created:** [21. März 2022 um 17:39 UTC](https://forum.shopware.com/t/per-plugin-template-manipulieren/93586 "2022-03-21T17:39:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christian.Saeum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/christian.saeum/32/15763_2.png) [@Christian.Saeum](https://forum.shopware.com/u/Christian.Saeum)\
**Post date:** [21. März 2022 um 17:39 UTC](https://forum.shopware.com/t/per-plugin-template-manipulieren/93586/1 "2022-03-21T17:39:25Z")

</div>

Ich habe mir ein kleines Plugin gemacht und kann dort im Backend schon meine Einstellungen vornehmen.

Nun möchte ich aufgrund der Einstellungen das Plugin manipulieren.

Ich habe im Pluginverzeichnis auch schon die index/index.tpl und index/header.tpl angelegt und möchte nun dort aufgrund der Einstellungen die 2 Dateien manipulieren.

Leider kommen die änderungen nicht im Frontend an. Was muss da noch in meine MeinPlugin.php?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [21. März 2022 um 19:50 UTC](https://forum.shopware.com/t/per-plugin-template-manipulieren/93586/2 "2022-03-21T19:50:02Z")

</div>

Theme neu kompiliert und Cache geleert?

---

<div class="post-metadata">

**Author:** ![Christian.Saeum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/christian.saeum/32/15763_2.png) [@Christian.Saeum](https://forum.shopware.com/u/Christian.Saeum)\
**Post date:** [21. März 2022 um 20:42 UTC](https://forum.shopware.com/t/per-plugin-template-manipulieren/93586/3 "2022-03-21T20:42:27Z")

</div>

Ja klar schon öfters

Habe es gerade mal direkt im Theme was gemacht um zu sehen das es „eigentlich“ geht.

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [21. März 2022 um 21:46 UTC](https://forum.shopware.com/t/per-plugin-template-manipulieren/93586/4 "2022-03-21T21:46:57Z")

</div>

Dann musst du wohl den Ausschnitt posten, um den Fehler analysieren zu können.

---

<div class="post-metadata">

**Author:** ![MrAle](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@MrAle](https://forum.shopware.com/u/MrAle)\
**Post date:** [22. März 2022 um 05:44 UTC](https://forum.shopware.com/t/per-plugin-template-manipulieren/93586/5 "2022-03-22T05:44:58Z")

</div>

Hi,

Hast du denn einen Subscriber aufs Frontend?  
Dann solltest du noch die TemplateDir hinzufügen.

Grüße

---

<div class="post-metadata">

**Author:** ![Christian.Saeum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/christian.saeum/32/15763_2.png) [@Christian.Saeum](https://forum.shopware.com/u/Christian.Saeum)\
**Post date:** [3. April 2022 um 16:57 UTC](https://forum.shopware.com/t/per-plugin-template-manipulieren/93586/6 "2022-04-03T16:57:09Z")

</div>

Da muss ich soweit passen?  
Der große Programmierer bin ich hier nicht.

Ich habe mal bei anderen OpenSource Plugins mal geschaut aber weiß nicht was ich hier wirklich brauche.

Daher muss ich deine Frage soweit mit „nein“ beantworten.

Soweit ich mich eingelesen habe: Brauch ich das hier. Aber mir ist nicht komplett klar wo ich das brauche und wieweit.

> **[Shopware event list](https://developers.shopware.com/developers-guide/event-list/#theme_inheritance_template_directories_collected)**
>
> Shopware event list
