# Footer Template wird nicht extended

**URL:** <https://forum.shopware.com/t/footer-template-wird-nicht-extended/36155>\
**Category:** Programmierung\
**Created:** [20. April 2016 um 09:29 UTC](https://forum.shopware.com/t/footer-template-wird-nicht-extended/36155 "2016-04-20T09:29:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![coarsy](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coarsy](https://forum.shopware.com/u/coarsy)\
**Post date:** [20. April 2016 um 09:29 UTC](https://forum.shopware.com/t/footer-template-wird-nicht-extended/36155/1 "2016-04-20T09:29:47Z")

</div>

Hi zusammen,

ich bin immer noch dabei, einige Extensions auf die neue Struktur umzustellen, allerdings geht das bei allen, bis auf die Footer Erweiterung:

So sieht die Struktur im Plugin aus:

meinplugin/Views/responsive/frontend/index/footer.tpl

Inhalt der footer.tpl:

&nbsp;

```
{extends file="parent:frontend/index/footer.tpl"}

{block name="frontend_index_footer_copyright" append}

Gib mir hier was aus!
  
{/block}              

```

Letzter Abschnitt im Plugin:

&nbsp;

```
    public function onPostDispatchDetail(Enlight_Event_EventArgs $arguments)
    {

        /**@var $controller Shopware_Controllers_Frontend_Listing*/
        $controller = $arguments->getSubject();

        $controller->View()->addTemplateDir($this->Path() . 'Views/common/');

        if (Shopware()->Shop()->getTemplate()->getVersion() >= 3) {
            $controller->View()->addTemplateDir($this->Path() . 'Views/responsive/');
        } else {
            $controller->View()->addTemplateDir($this->Path() . 'Views/emotion/');
            $controller->View()->extendsTemplate('frontend/index/header.tpl');
            $controller->View()->extendsTemplate('frontend/detail/index.tpl');
        }

    }

```

Ich habe keinen blassen Schimmer, wieso das Template nicht ausgegeben wird!

LG und Dankeschön,

Chris

---

<div class="post-metadata">

**Author:** ![coarsy](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coarsy](https://forum.shopware.com/u/coarsy)\
**Post date:** [20. April 2016 um 10:55 UTC](https://forum.shopware.com/t/footer-template-wird-nicht-extended/36155/2 "2016-04-20T10:55:08Z")

</div>

Wenn ich

```
{extends file="parent:frontend/index/index.tpl"}

```

verwende, dann funktionierts 🙂

---

<div class="post-metadata">

**Author:** ![PhiloGant](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@PhiloGant](https://forum.shopware.com/u/PhiloGant)\
**Post date:** [11. Mai 2016 um 11:35 UTC](https://forum.shopware.com/t/footer-template-wird-nicht-extended/36155/3 "2016-05-11T11:35:13Z")

</div>

Bei mir funktioniert es auch nicht mit “index.tpl”.

&nbsp;

Grundsätzlich habe ich eigentlich nur das “Slogan Of The Day” Plugin umgeschrieben um im Footer Social Media Icons auszugeben… funktioniert nicht.

&nbsp;

```
    public function onFrontendPostDispatch(Enlight_Event_EventArgs $args)
    {
        /** @var \Enlight_Controller_Action $controller */
        $controller = $args->get('subject');
        $view = $controller->View();

        $view->addTemplateDir(
            __DIR__. '/Views'
        );

        $view->assign('faceBook', $this->Config()->get('faceBook'));
        $view->assign('youTube', $this->Config()->get('youTube'));
        $view->assign('googlePlus', $this->Config()->get('googlePlus'));
        $view->assign('instagram', $this->Config()->get('instagram'));
        $view->assign('twitter', $this->Config()->get('twitter'));
        $view->assign('additional', $this->Config()->get('additional'));
    }

```

&nbsp;

&nbsp;

```
{extends file="parent:frontend/index/footer.tpl"}

{block name='frontend_index_footer_menu'}
    
        
            
                {if $facebook}Facebook{/if}
                {if $youTube}Twitter{/if}
                {if $googlePlus}Google+{/if}
                {if $instagram}Instagram{/if}
                {if $twitter}Twitter{/if}
                {if $additional}{$additional}{/if}
                TEST
            
        
        {include file='frontend/index/footer-navigation.tpl'}
    
{/block}

```

&nbsp;

Das Original soll dabei überschrieben werden, auf der Seite kommt das aber (trotz neu kompliieren des Themes und leeren des Caches) nicht an.

---

<div class="post-metadata">

**Author:** ![coarsy](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coarsy](https://forum.shopware.com/u/coarsy)\
**Post date:** [11. Mai 2016 um 11:57 UTC](https://forum.shopware.com/t/footer-template-wird-nicht-extended/36155/4 "2016-05-11T11:57:22Z")

</div>

Sorry, das habe ich an dieser Stelle auch noch nicht richtig kapiert. Ich nehme an, dass da noch irgendein anderes Template dazwischen funkt, welches den Block ebenfalls erweitert…

---

<div class="post-metadata">

**Author:** ![PhiloGant](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@PhiloGant](https://forum.shopware.com/u/PhiloGant)\
**Post date:** [17. Mai 2016 um 11:45 UTC](https://forum.shopware.com/t/footer-template-wird-nicht-extended/36155/5 "2016-05-17T11:45:46Z")

</div>

Ich ging auch erst von einem anderen Plugin aus, allerdings war es die Reihenfolge, in der die Templates verarbeitet wurden.

&nbsp;

Bei der Standardreihenfolge verarbeitet SW5 folgendermaßen:

&nbsp;

Bare =\> Responsive =\> Plugins =\> Custom Theme

&nbsp;

Set 5.1.2 kann man die Reihenfolge mit folgender Zeile in der Theme.php anpassen:

&nbsp;

```
 protected $injectBeforePlugins = true;

```

(gefunden in: [http://forum.shopware.com/discussion/32198/ladereihenfolge-von-template-informationen-falsch](http://forum.shopware.com/discussion/32198/ladereihenfolge-von-template-informationen-falsch) ), damit wird es dann:

&nbsp;

Bare =\> Responsive =\> Custom Theme =\> Plugin

&nbsp;
