# custom CMS - Block Kategorie

**URL:** <https://forum.shopware.com/t/custom-cms-block-kategorie/61624>\
**Category:** Programmierung\
**Created:** [9. September 2019 um 06:32 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624 "2019-09-09T06:32:21Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [9. September 2019 um 06:32 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/1 "2019-09-09T06:32:21Z")

</div>

Aktuell gibt es ja vier Block Kategorien Text, Images, Text&Images, Commerce.

Gibt es eine Möglichkeit eine eigene Kategorie hinzuzufügen, wo man dann praktisch all seine custom Elemente rein packt?

Andernfalls wäre es extremst unübersichtlich.

---

<div class="post-metadata">

**Author:** ![digitalhoch3](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@digitalhoch3](https://forum.shopware.com/u/digitalhoch3)\
**Post date:** [9. September 2019 um 08:47 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/2 "2019-09-09T08:47:56Z")

</div>

Fände ich auch spannend, habe aber noch nichts gefunden dazu…

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [11. September 2019 um 10:08 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/3 "2019-09-11T10:08:47Z")

</div>

[@Moritz Naczenski]([http://forum.shopware.com/profile/14574/Moritz](http://forum.shopware.com/profile/14574/Moritz) Naczenski “Moritz Naczenski”)‍ Hast du vielleicht Infos dazu? 🙂

---

<div class="post-metadata">

**Author:** ![tpantring](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/tpantring/32/13364_2.png) [@tpantring](https://forum.shopware.com/u/tpantring)\
**Post date:** [11. September 2019 um 12:21 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/4 "2019-09-11T12:21:33Z")

</div>

Hallo zusammen,

ihr könnt den&nbsp;`sw_cms_detail_sidebar_block_overview_category`&nbsp;in der&nbsp;`sw-cms-detail.html.twig`&nbsp;via plugin Überschreiben und eure eigenen Optionen hinzufügen. Danach könnt Ihr dann eure Böcke&nbsp;zur neuen Kategorie&nbsp;zuweisen&nbsp;(CustomBlock/index.js -\> category: ‘newType’)&nbsp;

Hoffentlich hilft euch die Info weiter.&nbsp;

Viele Grüße aus Schöppingen  
&nbsp;Thorben Pantring

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [11. September 2019 um 12:24 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/5 "2019-09-11T12:24:32Z")

</div>

@tpantring‍ Super, vielen Dank 🙂

---

<div class="post-metadata">

**Author:** ![Moorleiche](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Moorleiche](https://forum.shopware.com/u/Moorleiche)\
**Post date:** [11. September 2019 um 14:32 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/6 "2019-09-11T14:32:25Z")

</div>

Aber Vorsicht, macht nicht den selben Fehler wie ich und trennt Blöcke und Elemente 😉 Denn Blöcke sind nur fürs Layout und mit den Elementen füllt man die Blöcke.

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [11. September 2019 um 15:38 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/7 "2019-09-11T15:38:24Z")

</div>

> [@Moorleiche schrieb:](https://forum.shopware.com/profile/32221/Moorleiche "Moorleiche")
> 
> Aber Vorsicht, macht nicht den selben Fehler wie ich und trennt Blöcke und Elemente ![;)](https://dub1.discourse-cdn.com/flex013/resources/emoji/wink.png ";)") Denn Blöcke sind nur fürs Layout und mit den Elementen füllt man die Blöcke.

Ja habe vor ein paar Stunden auch erst den Unterschied zwischen Blöcken & Elementen gerallt :D&nbsp;

---

<div class="post-metadata">

**Author:** ![yicdeniz](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/yicdeniz/32/7847_2.png) [@yicdeniz](https://forum.shopware.com/u/yicdeniz)\
**Post date:** [13. September 2019 um 17:28 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/8 "2019-09-13T17:28:28Z")

</div>

Vielleicht erstellst du auch ein Tutorial direkt dazu. Vermisse die alten Hostianer Tutorials. =)&nbsp;

> [@Shopwareianer schrieb:](https://forum.shopware.com/profile/15489/Shopwareianer "Shopwareianer")
> 
> > [@Moorleiche schrieb:](https://forum.shopware.com/profile/32221/Moorleiche "Moorleiche")
> > 
> > Aber Vorsicht, macht nicht den selben Fehler wie ich und trennt Blöcke und Elemente ![;)](https://dub1.discourse-cdn.com/flex013/resources/emoji/wink.png ";)") Denn Blöcke sind nur fürs Layout und mit den Elementen füllt man die Blöcke.
> 
> Ja habe vor ein paar Stunden auch erst den Unterschied zwischen Blöcken & Elementen gerallt ![:D](https://dub1.discourse-cdn.com/flex013/resources/emoji/lol.png ":D")&nbsp;

---

<div class="post-metadata">

**Author:** ![Moorleiche](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Moorleiche](https://forum.shopware.com/u/Moorleiche)\
**Post date:** [15. September 2019 um 18:50 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/9 "2019-09-15T18:50:01Z")

</div>

> [@yicdeniz schrieb:](https://forum.shopware.com/profile/23784/yicdeniz "yicdeniz")
> 
> Vielleicht erstellst du auch ein Tutorial direkt dazu. Vermisse die alten Hostianer Tutorials. ![=)](https://dub1.discourse-cdn.com/flex013/resources/emoji/smiley.png "=)")&nbsp;
> 
> > [@Shopwareianer schrieb:](https://forum.shopware.com/profile/15489/Shopwareianer "Shopwareianer")
> > 
> > > [@Moorleiche schrieb:](https://forum.shopware.com/profile/32221/Moorleiche "Moorleiche")
> > > 
> > > Aber Vorsicht, macht nicht den selben Fehler wie ich und trennt Blöcke und Elemente ![;)](https://dub1.discourse-cdn.com/flex013/resources/emoji/wink.png ";)") Denn Blöcke sind nur fürs Layout und mit den Elementen füllt man die Blöcke.
> > 
> > Ja habe vor ein paar Stunden auch erst den Unterschied zwischen Blöcken & Elementen gerallt ![:D](https://dub1.discourse-cdn.com/flex013/resources/emoji/lol.png ":D")&nbsp;

Ein Tutorial?&nbsp;Das Wissen muss hart erarbeitet werden&nbsp; ![Grin](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/70033cde8e8ff79cfa538293ae71318d6f788423.png "Grin")

---

<div class="post-metadata">

**Author:** ![digitalhoch3](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@digitalhoch3](https://forum.shopware.com/u/digitalhoch3)\
**Post date:** [19. September 2019 um 09:24 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/10 "2019-09-19T09:24:57Z")

</div>

Wenn man dann Änderungen im Ordner “component” oder “preview” gemacht hat, muss man ja jedes Mal&nbsp;./psh.phar administration:build ausführen, damit man was von den Änderungen sieht, nur die Frontend Templates können direkt geändert werden. Dauert bei mir leider jedes Mal 90 bis 110 Sekunden, gibt’s da nen Trick wie man das Ganze beschleunigen kann?

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [19. September 2019 um 09:26 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/11 "2019-09-19T09:26:24Z")

</div>

./psh.phar administration:watch startet den watch & hot-reload modus für das backend.

---

<div class="post-metadata">

**Author:** ![digitalhoch3](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@digitalhoch3](https://forum.shopware.com/u/digitalhoch3)\
**Post date:** [19. September 2019 um 09:44 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/12 "2019-09-19T09:44:06Z")

</div>

Super, danke!!!

Bekomme&nbsp;aber leider wilde Fehlermeldungen in der Art:

```
	 WAIT Compiling...9:41:42 AM
	
	ℹ ｢wdm｣: Compiling...
	 DONE Compiled successfully in 2140ms9:41:44 AM
	
	ℹ ｢wdm｣: 3271 modules
	ℹ ｢wdm｣: Compiled successfully.
	(node:521) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/app/platform/src/Administration/Resources/public/static/css/storefront.css'
	(node:521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
	(node:521) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/app/platform/src/Administration/Resources/public/storefront.14065f1e6cef1d19edd0.hot-update.js'
	(node:521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
	(node:521) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/app/platform/src/Administration/Resources/public/static/js/storefront.js'
	(node:521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)
	(node:521) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/app/platform/src/Administration/Resources/public/custom-cms-block.14065f1e6cef1d19edd0.hot-update.js'
	(node:521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
	(node:521) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/app/platform/src/Administration/Resources/public/static/css/custom-cms-block.css'
	(node:521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)
	(node:521) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/app/platform/src/Administration/Resources/public/static/js/custom-cms-block.js'
	(node:521) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)

```

Die kommen beim normalen build nicht.

---

<div class="post-metadata">

**Author:** ![Moorleiche](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Moorleiche](https://forum.shopware.com/u/Moorleiche)\
**Post date:** [19. September 2019 um 16:04 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/13 "2019-09-19T16:04:02Z")

</div>

> [@digitalhoch3 schrieb:](https://forum.shopware.com/profile/19613/digitalhoch3 "digitalhoch3")
> 
> Wenn man dann Änderungen im Ordner „component“ oder „preview“ gemacht hat, muss man ja jedes Mal&nbsp;./psh.phar administration:build ausführen, damit man was von den Änderungen sieht, nur die Frontend Templates können direkt geändert werden. Dauert bei mir leider jedes Mal 90 bis 110 Sekunden, gibt’s da nen Trick wie man das Ganze beschleunigen kann?

du glücklicher, bei mir dauert es 3-mal so lang… muss mal neue Hardware her ;)&nbsp;

---

<div class="post-metadata">

**Author:** ![digitalhoch3](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@digitalhoch3](https://forum.shopware.com/u/digitalhoch3)\
**Post date:** [20. September 2019 um 06:35 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/14 "2019-09-20T06:35:43Z")

</div>

CPUs sind durch nichts zu ersetzen außer durch noch größere CPUs&nbsp; ![Grin](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/grin.png "Grin")

---

<div class="post-metadata">

**Author:** ![ural](https://avatars.discourse-cdn.com/v4/letter/u/b5e925/32.png) [@ural](https://forum.shopware.com/u/ural)\
**Post date:** [10. Dezember 2019 um 14:27 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/15 "2019-12-10T14:27:45Z")

</div>

> [@tpantring schrieb:](https://forum.shopware.com/profile/32473/tpantring "tpantring")
> 
> Hallo zusammen,
> 
> ihr könnt den&nbsp;`sw_cms_detail_sidebar_block_overview_category`&nbsp;in der&nbsp;`sw-cms-detail.html.twig`&nbsp;via plugin Überschreiben und eure eigenen Optionen hinzufügen. Danach könnt Ihr dann eure Böcke&nbsp;zur neuen Kategorie&nbsp;zuweisen&nbsp;(CustomBlock/index.js -\> category: ‚newType‘)&nbsp;
> 
> Hoffentlich hilft euch die Info weiter.&nbsp;
> 
> Viele Grüße aus Schöppingen  
> &nbsp;Thorben Pantring

Was würde den passieren wenn mehrere Plugins die gleiche stolle so überschreiben? Ich kann mir gut vorstellen dass im Zukunft einige „CMS - Erweiterungs Plugins“ geben wird&nbsp;mit eigenen Kategorienamen.

Mann sollte hier lieber nur die Options erweitern können anstelle den gesamten Block zu überschreiben - oder sehe ich das Falshc?!

---

<div class="post-metadata">

**Author:** ![kull\_martin](https://avatars.discourse-cdn.com/v4/letter/k/53a042/32.png) [@kull\_martin](https://forum.shopware.com/u/kull_martin)\
**Post date:** [30. Dezember 2019 um 18:29 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/16 "2019-12-30T18:29:00Z")

</div>

> [@tpantring schrieb:](https://forum.shopware.com/profile/32473/tpantring "tpantring")
> 
> Hallo zusammen,
> 
> ihr könnt den&nbsp;`sw_cms_detail_sidebar_block_overview_category`&nbsp;in der&nbsp;`sw-cms-detail.html.twig`&nbsp;via plugin Überschreiben und eure eigenen Optionen hinzufügen. Danach könnt Ihr dann eure Böcke&nbsp;zur neuen Kategorie&nbsp;zuweisen&nbsp;(CustomBlock/index.js -\> category: ‚newType‘)&nbsp;
> 
> Hoffentlich hilft euch die Info weiter.&nbsp;
> 
> Viele Grüße aus Schöppingen  
> &nbsp;Thorben Pantring

&nbsp;Um die Blockkategorie zu erweitern muss man den Block „sw\_cms\_detail\_sidebar\_block\_overview\_category“ überschreiben welcher&nbsp;sich bei mir inzwischen in der Datei „sw-cms-sidebar.html.twig“ befindet.  
Der Pfad hierzu ist&nbsp;„/plattform/src/Administration/Resources/app/administration/src/module/ …“

Wie kann ich die Datei in mein Plugin einbinden um den entsprechenden Block zu erweitern welches sich in /custom/mein\_plugin/… befindet.

Mit "{% sw\_extends '@Parent/ … erreiche ich den Pfad nicht.

Muss man hierfür einen anderen Weg gehen?

Freundliche Grüsse und allen hier einen guten Rutsch ins neue Jahr.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![digitalhoch3](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@digitalhoch3](https://forum.shopware.com/u/digitalhoch3)\
**Post date:** [9. Januar 2020 um 09:28 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/17 "2020-01-09T09:28:48Z")

</div>

Oh man, nach Update auf 6.1 werden nun meine Blöcke im Backend nicht mehr gefunden. Habe schon die Struktur angepasst wie in&nbsp;vendor/shopware/administration/Resources/app/administration/src/module/sw-cms/blocks/, die Vorschau Elemente erscheinen aber nicht. Bereits&nbsp;vorhandene Elemente in den Erlebniswelten sind zwar vorhanden, werden aber auch nicht korrekt dargestellt.

Im Frontend passt aber alles noch, hat jemand einen Tipp?

---

<div class="post-metadata">

**Author:** ![pp-delife](https://avatars.discourse-cdn.com/v4/letter/p/b38774/32.png) [@pp-delife](https://forum.shopware.com/u/pp-delife)\
**Post date:** [12. Dezember 2023 um 07:42 UTC](https://forum.shopware.com/t/custom-cms-block-kategorie/61624/18 "2023-12-12T07:42:02Z")

</div>

Hej @digitalhoch3 und allg.,

durch Shopware 6 hat sich das Anlegen einer Custom CMS Category leicht verändert.  
Hier ein richtig guter Beitrag von Joschi (Ninja Army):

> **[Creating own block categories in Shopware 6](https://ninja-army.hashnode.dev/creating-a-block-category-in-shopware-6)**
>
> Creating CMS-Blocks is the best way to extend your Shopware. Once you have a couple of blocks it gets confusing. That's why we create an own block category

damit lässt sich ganz leicht eine Custom CMS Category anlegen.  
Approved durch mich, da ich diese gerade bei uns im System erfolgreich angelegt habe.

Beste Grüße  
Pascal
