# Shopware 6 Hooks, Modifizierung Ajax Request an CmsController/Widget Route

**URL:** <https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175>\
**Category:** Programmierung\
**Created:** [3. Juni 2024 um 09:20 UTC](https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175 "2024-06-03T09:20:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adelbert](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Adelbert](https://forum.shopware.com/u/Adelbert)\
**Post date:** [3. Juni 2024 um 09:20 UTC](https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175/1 "2024-06-03T09:20:25Z")

</div>

Hallo zusammen,

ich möchte gern Informationen zur Response beim Aufruf der category function in CmsController.php bzw. bei Aufruf der Route `/widgets/cms/navigation/{navigationId}` hinzufügen. Wie kann ich das erreichen? Es gibt ja den CmsPageLoadedHook, wie kann ich diesen Nutzen? Ich finde zu den Hooks keinerlei Doku bzw. Tutorial.

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [3. Juni 2024 um 09:46 UTC](https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175/2 "2024-06-03T09:46:01Z")

</div>

> **[Starter Guide - Read and Write Data | Shopware Documentation](https://developer.shopware.com/docs/guides/plugins/apps/starter/product-translator.html#webhooks)**
>
> Documentation for Shopware developers

---

<div class="post-metadata">

**Author:** ![Adelbert](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Adelbert](https://forum.shopware.com/u/Adelbert)\
**Post date:** [3. Juni 2024 um 10:08 UTC](https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175/3 "2024-06-03T10:08:03Z")

</div>

Okay danke, das hilft etwas weiter. Also muss ich zwingend über den App Weg gehen und kann das nicht per Plugin lösen? Oder gehen die Hooks auch irgendwie per Plugin?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [3. Juni 2024 um 10:36 UTC](https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175/4 "2024-06-03T10:36:09Z")

</div>

Webhooks sind für Apps.

Events sind für Plugins.

Ob Webhooks auch bei Plugins funktionieren, kann ich dir nicht beantworten. Auf Grund der Art der Subscription denke ich eher nicht. Aber vermutlich gibt es auch überhaupt keine Notwendigkeit bei Plugins dafür.

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [3. Juni 2024 um 10:41 UTC](https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175/5 "2024-06-03T10:41:59Z")

</div>

CmsPageLoadedEvent

> **[Listening to Events | Shopware Documentation](https://developer.shopware.com/docs/guides/plugins/plugins/plugin-fundamentals/listening-to-events.html#creating-your-own-subscriber)**
>
> Documentation for Shopware developers

---

<div class="post-metadata">

**Author:** ![Adelbert](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Adelbert](https://forum.shopware.com/u/Adelbert)\
**Post date:** [3. Juni 2024 um 11:26 UTC](https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175/6 "2024-06-03T11:26:11Z")

</div>

Super danke dir für die Erklärung. Mir war nicht bewusst, dass das Event auch bei Ajax Aufruf geworfen wird.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/2/9/29c7587ba660f00e4995d1743162782e5d6d8653.svg) [@system](https://forum.shopware.com/u/system)\
**Post date:** [3. Juli 2024 um 11:26 UTC](https://forum.shopware.com/t/shopware-6-hooks-modifizierung-ajax-request-an-cmscontroller-widget-route/104175/7 "2024-07-03T11:26:27Z")

</div>

Dieses Thema wurde automatisch 30 Tage nach der letzten Antwort geschlossen. Es sind keine neuen Antworten mehr erlaubt.
