# Is NavigationLoadedEvent triggered when a request is sent to /store-api/navigation/main-navigation/{id}?

**URL:** <https://forum.shopware.com/t/is-navigationloadedevent-triggered-when-a-request-is-sent-to-store-api-navigation-main-navigation-id/103286>\
**Category:** Shopware 6 (German)\
**Tags:** programming\
**Created:** [11. März 2024 um 16:54 UTC](https://forum.shopware.com/t/is-navigationloadedevent-triggered-when-a-request-is-sent-to-store-api-navigation-main-navigation-id/103286 "2024-03-11T16:54:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![h.72.ghorashi](https://avatars.discourse-cdn.com/v4/letter/h/a698b9/32.png) [@h.72.ghorashi](https://forum.shopware.com/u/h.72.ghorashi)\
**Post date:** [11. März 2024 um 16:54 UTC](https://forum.shopware.com/t/is-navigationloadedevent-triggered-when-a-request-is-sent-to-store-api-navigation-main-navigation-id/103286/1 "2024-03-11T16:54:38Z")

</div>

Hey there,

I’m looking to enhance the media data included as a custom field within the Navigation data when making a request to `/store-api/navigation/main-navigation`. To achieve this, I decided to implement a subscriber that listens to `NavigationLoadedEvent`. But, I’ve encountered an issue where the `dd('test')` statement isn’t executed, despite the subscriber being correctly registered. I’m wondering if the `NavigationLoadedEvent` is actually being triggered, when calling this api at all or if I should consider a different approach?

```auto
<?php declare(strict_types=1);

namespace Etopia\ApiExtender\Subscriber;

use Shopware\Core\Content\Category\Event\NavigationLoadedEvent;
use Shopware\Core\Content\Media\MediaCollection;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
use Shopware\Core\Framework\Struct\ArrayStruct;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class NavigationMediaSubscriber implements EventSubscriberInterface
{
    private $mediaRepository;

    public function __construct(EntityRepositoryInterface $mediaRepository)
    {
        $this->mediaRepository = $mediaRepository;
    }

    public static function getSubscribedEvents(): array
    {
        return [
            NavigationLoadedEvent::class => 'onNavigationLoaded',
        ];
    }

    public function onNavigationLoaded(NavigationLoadedEvent $event): void
    {
        dd('test');
    }
}

```

Thanks, and apologies, as I’m quite new to Shopware.
