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..

Hi, can anyone tell me why Spryker added or changed the extends on Twig files? not at all files but

U01AM1YGRC2
U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet
edited March 2021 in Help

Hi, can anyone tell me why Spryker added or changed the extends on Twig files?

not at all files but on many:

{% extends model('component') %}
{% import model('component') as component %}

when do we use this import?

Comments

  • Serhii Chepela
    Serhii Chepela Sprykee Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    In order to support Twig v3.
    In Twig 3 you need add this import in order to get macros from the parent template

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet

    okay, so if we want to overwrite the Pyz Twig Components with our own, we have to adjust the same right?

  • Serhii Chepela
    Serhii Chepela Sprykee Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    If you want them to be supported by Twig3 - yes

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet

    okay, thank you.