# Tab mit Sub-Tab

**URL:** https://forum.shopware.com/t/tab-mit-sub-tab/48532
**Category:** Programmierung
**Created:** [28. September 2017 um 09:03 UTC](https://forum.shopware.com/t/tab-mit-sub-tab/48532 "2017-09-28T09:03:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Haraldio](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@Haraldio](https://forum.shopware.com/u/Haraldio)
#### Post date: [28. September 2017 um 09:03 UTC](https://forum.shopware.com/t/tab-mit-sub-tab/48532/1 "2017-09-28T09:03:14Z")

</div>

In der Theme.php lege ich einen Tab an und möchte nun in diesem Tab Unter-Tabs haben.

Script like so:

```
	    $tab = $this->createTab(
	        'stitch_tab',
	        'Stitch'
	    );
	    $subtab1 = $this->createTab(
	        'stitch_colors_tab',
	        'Stickfarben'
	    );
	    $subtab2 = $this->createTab(
	        'stitch_others_tab',
	        'Einstellungen'
	    );
	    $fieldset1 = $this->createFieldSet(
	        'stitch_fieldset1',
	        'Farbeinstellungen für Stitch'
	    );
	    $fieldset2 = $this->createFieldSet(
	        'stitch_fieldset1',
	        'Andere Einstellungen für Stitch'
	    );
	    $colorPickerFieldOne = $this->createColorPickerField(
	        'stitch-color-one',
	        'Stickfarbe1',
	        '#00008B'
	    );
		$fieldset1->addElement($colorPickerFieldOne);
...
	    $textField = $this->createTextField(
	        'stitchMusterText',
	        'Mustertext',
	        'Muster'
	    );
		$fieldset2->addElement($textField);
	    $subtab1->addElement($fieldset1);
	    $subtab2->addElement($fieldset2);
	    $tab->addElement($subtab1);
	    $tab->addElement($subtab2);
	    $container->addTab($tab);

```

Was msche ich denn falsch?

(Sorry, war in falscher Kategorie)
