# CMS Block Erstellung

**URL:** <https://forum.shopware.com/t/cms-block-erstellung/72410>\
**Category:** Programmierung\
**Created:** [29. Januar 2021 um 10:40 UTC](https://forum.shopware.com/t/cms-block-erstellung/72410 "2021-01-29T10:40:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![svendale](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@svendale](https://forum.shopware.com/u/svendale)\
**Post date:** [29. Januar 2021 um 10:40 UTC](https://forum.shopware.com/t/cms-block-erstellung/72410/1 "2021-01-29T10:40:22Z")

</div>

Moin 🙂

ich will auf Basis von [Shopware 6: Adding a custom CMS block](https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-block) meinen eigenes CMS Element erstellen.

ich habe den Sample Source gedownloaded, und die Namings angepasst. Zudem habe ich es umgestellt, das es nicht image-text als Grundelement nutzt sondern text.

Ich habe das Plugin installiert, aktiviert, das Theme compiliert und den Cache geleert.

sprich: plugin:install xxxx

plugin:activate xxx

cache:clear

theme:compile

Leider erscheint das neue Element nicht in der Einkaufsfelt. Wie bekomme ich Fehlermeldungen, was falsch lief bzw wie kann ich es debuggen?

Anbei der Beispielcode.

[http://www-development.de/WaltermuellerCMSBlocks.zip](http://www-development.de/WaltermuellerCMSBlocks.zip)

LG  
Sven

---

<div class="post-metadata">

**Author:** ![svendale](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@svendale](https://forum.shopware.com/u/svendale)\
**Post date:** [29. Januar 2021 um 10:47 UTC](https://forum.shopware.com/t/cms-block-erstellung/72410/2 "2021-01-29T10:47:18Z")

</div>

vlt kann mir auch wer den Fehler mitteilen. 🙂

---

<div class="post-metadata">

**Author:** ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)\
**Post date:** [29. Januar 2021 um 12:19 UTC](https://forum.shopware.com/t/cms-block-erstellung/72410/3 "2021-01-29T12:19:51Z")

</div>

Hallo,

hast du nach den&nbsp;Änderungen, wie hier&nbsp;[https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-block?#block-preview](https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-block?_ga=2.141813298.1649182475.1610388533-757085075.1574513955#block-preview)&nbsp;beschrieben, auch&nbsp;./psh.phar administration:build ausgeführt (insofern du das Development - Template nutzt, im Production - Template dann [production/build-administration.sh at 6.3 · shopware/production · GitHub](https://github.com/shopware/production/blob/6.3/bin/build-administration.sh) )? Sonst ändert sich da nichts.

Und mit der von dir verlinkten Dokumentation erstellt du einen CMS-Block, kein CMS-Element. Dafür wäre dann eher diese Dokumentation nötig:&nbsp;[Shopware 6: Adding a custom CMS element](https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-element) . Ein CMS - Block erscheint rechts im Bereich, je nachdem welcher (Block-)Kategorie du ihn zugeordnet hast. Ein CMS - Element platziert man in einem CMS - Block, der sich schon in einer Erlebniswelt befindet.

Grüße

Sebastian

---

<div class="post-metadata">

**Author:** ![svendale](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@svendale](https://forum.shopware.com/u/svendale)\
**Post date:** [29. Januar 2021 um 12:43 UTC](https://forum.shopware.com/t/cms-block-erstellung/72410/4 "2021-01-29T12:43:38Z")

</div>

Danke dir! D.h ich muss zusätzlich noch zum CMS Element den CMS Block entwickeln, der es einkapselt?

Gibts ein Beispiel wie man das Beispiel CMS Element erweitert, das es in einem Block erscheint?

Also

> **[GitHub - shopwareArchive/swag-docs-custom-cms-element](https://github.com/shopwareArchive/swag-docs-custom-cms-element)**
>
> Contribute to shopwareArchive/swag-docs-custom-cms-element development by creating an account on GitHub.

Cool wäre ein einfaches Beispiel für die Kombi Block + Element…

&nbsp;

&nbsp;

> [@sschreier schrieb:](https://forum.shopware.com/profile/18157/sschreier "sschreier")
> 
> Hallo,
> 
> hast du nach den&nbsp;Änderungen, wie hier&nbsp;[https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-block?#block-preview](https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-block?_ga=2.141813298.1649182475.1610388533-757085075.1574513955#block-preview)&nbsp;beschrieben, auch&nbsp;./psh.phar administration:build ausgeführt (insofern du das Development - Template nutzt, im Production - Template dann [https://github.com/shopware/production/blob/6.3/bin/build-administration.sh](https://github.com/shopware/production/blob/6.3/bin/build-administration.sh) )? Sonst ändert sich da nichts.
> 
> Und mit der von dir verlinkten Dokumentation erstellt du einen CMS-Block, kein CMS-Element. Dafür wäre dann eher diese Dokumentation nötig:&nbsp;[https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-element](https://docs.shopware.com/en/shopware-platform-dev-en/how-to/custom-cms-element) . Ein CMS - Block erscheint rechts im Bereich, je nachdem welcher (Block-)Kategorie du ihn zugeordnet hast. Ein CMS - Element platziert man in einem CMS - Block, der sich schon in einer Erlebniswelt befindet.
> 
> Grüße
> 
> Sebastian

---

<div class="post-metadata">

**Author:** ![svendale](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@svendale](https://forum.shopware.com/u/svendale)\
**Post date:** [29. Januar 2021 um 12:59 UTC](https://forum.shopware.com/t/cms-block-erstellung/72410/5 "2021-01-29T12:59:55Z")

</div>

also was müsste ich auf

> **[shopware/swag-docs-custom-cms-block](https://github.com/shopware/swag-docs-custom-cms-block)**
>
> Contribute to shopware/swag-docs-custom-cms-block development by creating an account on GitHub.

anpassen, damit das Beispielelement verwendet wird:

> **[shopware/swag-docs-custom-cms-element](https://github.com/shopware/swag-docs-custom-cms-element)**
>
> Contribute to shopware/swag-docs-custom-cms-element development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![svendale](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@svendale](https://forum.shopware.com/u/svendale)\
**Post date:** [29. Januar 2021 um 13:03 UTC](https://forum.shopware.com/t/cms-block-erstellung/72410/6 "2021-01-29T13:03:40Z")

</div>

> <https://github.com/shopware/swag-docs-custom-cms-block/blob/master/src/Resources/app/administration/src/module/sw-cms/blocks/text-image/image-text-reversed/index.js>

```
**slots** : { **left** : **'text'** , **right** : **'image'** }

```

daraus wird

```
**slots** : { **left** : **'** dailymotion **'** , **right** : **'image'** }

```

?

&nbsp;
