What are the Slack Archives?

Itโ€™s a history of our time together in the Slack Community! Thereโ€™s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you wonโ€™t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, maybe someone can help us with the following problem -> we try to figure out how the Navi

U01AM1YGRC2
U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
edited June 2021 in Help

Hello, maybe someone can help us with the following problem ->

we try to figure out how the NavigationWidget should work. We found the following folder in B2B Shop - src/Pyz/Yves/NavigationWidget.

But canโ€™t find the navigation widget in the vendor, so our question is, is that NavigationWidget deprecated ? If yes, why there are these folder already (see in screenshot) ๐Ÿ™‚ ?

How I said, itโ€™s just confusing for us, maybe anyone can help us?

Comments

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,106 โš–๏ธ - Guardians (admin)

    Heyhey, have you looked in vendor/spryker-shop/navigation-widget ?
    https://github.com/spryker-shop/navigation-widget

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    I see we donโ€™t own this package in our project, we use the B2B demoshop as initial system

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    It looks like you found the problem ^^

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,106 โš–๏ธ - Guardians (admin)

    Seems to be not shipped by default (anymore?) - Also the last release for this module was 3 years ago. ๐Ÿ˜•

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    I see there is a contentNavigationWidget โ€ฆ

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,106 โš–๏ธ - Guardians (admin)
    edited June 2021

    yes, but namewise it is sth different - also the b2b-demo-shop project level NavigationWidget is referring to the core NavigationWidget

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Yes and this is not correct and very confusing ^^

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    So how should I call this widget, if I use findWidget(โ€˜ContentNavigationWidgetโ€™ [args โ€ฆ ]) the return is null, so thatโ€™s not the right way to use it in Twig

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,106 โš–๏ธ - Guardians (admin)

    I can not follow - Why are we now talking about the ContentNavigationWidget ? Wasnt it NavigationWidget before?

    As example for how to use a widget from the demoshop I found {% widget 'CustomerFullNameWidget' only %}{% endwidget %}

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited June 2021

    yes thatโ€™s right - as far as we can see, Spryker doesnโ€™t use NavigationWidget instead it will use the ContentNavigationWidget:

    I can not follow - Why are we now talking about the ContentNavigationWidget ? Wasnt it NavigationWidget before?

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited June 2021

    I tried any possibility to use it in twig but couldnโ€™t get it to run ๐Ÿ˜• the naming is also weird ^^ ContentNavigationTwigPlugin?

    as you mentioned: the normal call would be: {% widget 'SomeWidgetName' args[] %} but here this wonโ€™t work, maybe someone can help us with this? vendor/spryker-shop/content-navigation-widget/src/SprykerShop/Yves/ContentNavigationWidget/Plugin/Twig/ContentNavigationTwigPlugin.php should be called like {% widget 'ContentWidgetTwigPlugin' args['SOCIAL_LINKS', 'navigation-social'] %} or so.

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,106 โš–๏ธ - Guardians (admin)

    Heyhey,
    if you look into https://github.com/spryker-shop/content-navigation-widget/blob/master/src/SprykerS[โ€ฆ]NavigationWidget/Twig/ContentNavigationTwigFunctionProvider.php you will find the function name.

    if you look for it you will find usages in the cms-import-files, for example: {{ content_navigation('navigation-social-links', 'footer-social-links') }}

    so it does not work as a normal widget but rather as a custom twig function - does this help you?

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Thank you Florian, that helps a lot ๐Ÿ™‚ and learned something new ^^