# Bilder in einem Community-Plugin

**URL:** https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569
**Category:** Programmierung
**Created:** [17. Februar 2016 um 16:26 UTC](https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569 "2016-02-17T16:26:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![AvL](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@AvL](https://forum.shopware.com/u/AvL)
#### Post date: [17. Februar 2016 um 16:26 UTC](https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569/1 "2016-02-17T16:26:14Z")

</div>

Hallo Zusammen,

ich programmiere grade für einen Kunden von mir ein Plugin, welches auch 2 Bilder enthalten muss. Ich frage mich derzeit wie ich diese nun in meinem index.tpl verlinken kann. Ich habe folgende Strukur:  
&nbsp;

```
PluginName
| Controllers
| Views
|- frontend
|-- responsive
|--- _public
|---- img
|----- bild1.jpg
|----- bild2.jpg
|-- index
|--- index.tpl
| Bootstrap

```

Soweit läuft alles sehr gut; nur weiß ich nicht wie ich nun die Bilder (bild1.jpg und bild2.jpg) in der Datei index/index.tpl verlinken muss/soll/kann&nbsp; ![Foot-in-Mouth](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/foot-in-mouth.png "Foot-in-Mouth")

Wäre über einen kleinen Tipp dankbar…

Viele Grüße  
AvL

---

<div class="post-metadata">

### Author: ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)
#### Post date: [17. Februar 2016 um 16:36 UTC](https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569/2 "2016-02-17T16:36:38Z")

</div>

Du suchst wohl:

Viele Grüße

---

<div class="post-metadata">

### Author: ![AvL](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@AvL](https://forum.shopware.com/u/AvL)
#### Post date: [17. Februar 2016 um 16:55 UTC](https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569/3 "2016-02-17T16:55:34Z")

</div>

> [@Aquatuning GmbH schrieb:](https://forum.shopware.com/profile/11752/Aquatuning%20GmbH "Aquatuning%20GmbH")
> 
> Du suchst wohl:
> 
> Viele Grüße

Hallo Aquatuning,

Hat leider nicht funktioniert. Wenn ich mir den Pfad anschaue welche generiert wurde, sieht er wie folgt aus:

_/frontend/responsive/\_public/img/bild1.jpg_&nbsp;

Muss ich die Bilder unter umständen beim Installieren des Plugin (Methode install()) woanders hin kopieren? Und bei einem Uninstall (Methode uninstall()) wieder löschen?

&nbsp;

Viele Grüße  
AvL

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)
#### Post date: [17. Februar 2016 um 17:16 UTC](https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569/4 "2016-02-17T17:16:03Z")

</div>

Dann kennt smarty dein Template Verzeichnis nicht. Nutze addTemplateDir() um es bekannt zu machen.

Viele Grüße

---

<div class="post-metadata">

### Author: ![AvL](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@AvL](https://forum.shopware.com/u/AvL)
#### Post date: [17. Februar 2016 um 17:46 UTC](https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569/5 "2016-02-17T17:46:47Z")

</div>

Oh ha…Das probiere ich heute noch aus. Danke für den Tipp…

&nbsp;

Grüsse

---

<div class="post-metadata">

### Author: ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)
#### Post date: [17. Februar 2016 um 18:13 UTC](https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569/6 "2016-02-17T18:13:52Z")

</div>

> [@AvL schrieb:](https://forum.shopware.com/profile/20321/AvL "AvL")
> 
> Oh ha…Das probiere ich heute noch aus. Danke für den Tipp…
> 
> &nbsp;
> 
> Grüsse

&nbsp;

Hallo,

am besten du arbeitest vorab einmal den Plugin Quick Start von Shopware selbst durch: [Plugin quick Startup Guide](https://developers.shopware.com/developers-guide/plugin-quick-start/). Gerade beim Punkt „Event callback“ wird ja die addTemplateDir-Funktion erwähnt.

Beste Grüße

Sebastian

---

<div class="post-metadata">

### Author: ![AvL](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@AvL](https://forum.shopware.com/u/AvL)
#### Post date: [17. Februar 2016 um 19:14 UTC](https://forum.shopware.com/t/bilder-in-einem-community-plugin/34569/7 "2016-02-17T19:14:08Z")

</div>

Sauber…Ihr habt mir beide sehr geholfen. Nun wird mir einiges klar. Bisher brauchte ich immer nur Plugin ohne Frontend-Implementierungen.

&nbsp;

Viele Grüße  
AvL
