# Snippets not works

**URL:** <https://forum.shopware.com/t/snippets-not-works/54971>\
**Category:** International (English Only)\
**Tags:** themes--design\
**Created:** [4. September 2018 um 07:38 UTC](https://forum.shopware.com/t/snippets-not-works/54971 "2018-09-04T07:38:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![thecodebunny](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@thecodebunny](https://forum.shopware.com/u/thecodebunny)\
**Post date:** [21. September 2018 um 13:20 UTC](https://forum.shopware.com/t/snippets-not-works/54971/2 "2018-09-21T13:20:40Z")

</div>

Hello,

This might be late for you, but might help someone in need. In Theme.php

```
    private function BasicTab() {
        $basicTab = $this->createTab(
            'basic_tab',
            $this->getLabelAttribute()->get('basic_tab_label'),
            [
                'attributes' => [
                    'autoScroll' => true
                ]
            ]
        );
        $basicFieldset = $this->createFieldSet(
            'basic_fieldset',
            $this->getLabelAttribute()->get('basic_fieldset_label'),
            [
                'attributes' => [
                    'layout' => 'column',
                    'flex' => 0,
                    'defaults' => [
                        'columnWidth' => 1,
                        'labelWidth' => 180,
                        'margin' => '2 15 2 0', 
                        'anchor' => '100%'
                    ]
                ]
            ]
        );
        $basicFieldset->addElement(
            $this->createCheckboxField(
                'basic_checkbox',
                $this->getLabelAttribute()->get('basic_checkbox_label'),
                true,
                ['attributes' => ['lessCompatible' => false]]
            )
        );
        $basicTab->addElement($basicFieldset);
        return $basicTab;
    }

    private function getLabelAttribute()
    {
       return Shopware()->Snippets()->getNamespace('themes/MyThemeName/backend/config');
    }

```

&nbsp;

---

_[View the full topic](https://forum.shopware.com/t/snippets-not-works/54971)._
