# Wie lade ich mein plugin template statt theme template ein ?

**URL:** <https://forum.shopware.com/t/wie-lade-ich-mein-plugin-template-statt-theme-template-ein/53412>\
**Category:** Plugins\
**Created:** [11. Juni 2018 um 15:24 UTC](https://forum.shopware.com/t/wie-lade-ich-mein-plugin-template-statt-theme-template-ein/53412 "2018-06-11T15:24:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MHotait](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MHotait](https://forum.shopware.com/u/MHotait)\
**Post date:** [11. Juni 2018 um 15:24 UTC](https://forum.shopware.com/t/wie-lade-ich-mein-plugin-template-statt-theme-template-ein/53412/1 "2018-06-11T15:24:50Z")

</div>

hallo,

ich probiere jetzt mein erstes plugin einzubauen. Ich habe aber ein Fehler so das die custom theme template ist angezeigt statt meine plugin template ? wie mache ich es so das die template von plugin angezeigt ist ? danke im voraus

&nbsp;

MohtGeschenkVerpackung.php

```
scheduleClearCache($this->getCacheArray());
        parent::install($context);
 
    }
 
    public function uninstall(UninstallContext $context)
    {
        $context->scheduleClearCache($this->getCacheArray());
        parent::uninstall($context);
    }
 
    public function activate(ActivateContext $context)
    {
        $context->scheduleClearCache($this->getCacheArray());
        parent::install($context);
    }
 
    public function deactivate(DeactivateContext $context)
    {
        $context->scheduleClearCache($this->getCacheArray());
        parent::install($context);
    }
 
 
    /**
     * Get caches to clear
     *
     * @return array
     */
    private function getCacheArray()
    {
        return [
            InstallContext::CACHE_TAG_CONFIG,
            InstallContext::CACHE_TAG_HTTP
        ];
    }
}

```

Subscriber/TemplateRegistration.php

```
pluginDirectory = $pluginDirectory;
        $this->templateManager = $templateManager;
    }

    /**
     * {@inheritdoc}
     */
    public static function getSubscribedEvents()
    {
        return [
            'Enlight_Controller_Action_PreDispatch' => 'onPreDispatch'
        ];
    }

    public function onPreDispatch()
    {
        $this->templateManager->addTemplateDir($this->pluginDirectory . '/Resources/views');
    }
}

```

und Resources/service.xml

```
            %moht_geschenk_verpackung.plugin_dir%

```

die template habe ich unter Resources/views/checkout/cart\_footer.tpl

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

{* Add product using the sku *}
{block name='frontend_checkout_cart_footer_add_product'}
    aaaaaaaaa
{/block}

{block name='frontend_checkout_cart_footer_element'}
    vvvvv
{/block}

```

was fählt mir noch ?&nbsp;

Danke&nbsp;
