Skip to content

Latest commit

 

History

History
35 lines (31 loc) · 1.32 KB

2022-09-28-fix-twig-source-path.md

File metadata and controls

35 lines (31 loc) · 1.32 KB
title issue
Fix twig source path for icons
NEXT-23464

Core

  • Changed Shopware\Core\Framework\DependencyInjection\CompilerPass\TwigLoaderConfigCompilerPass to add path BUNDLE/Resources/app/storefront/dist to the TwigFileLoader.

Storefront

  • Changed storefront/utilities/icon.html.twig to only use dist directory for icons
  • Changed Shopware\Storefront\Framework\Routing\StorefrontSubscriber::addIconSetConfig to add path BUNDLE/Resources/app/storefront/dist to the TwigFileLoader.

Upgrade Information

Changed icon.html.twig

We changed the base paths to the icons in the template Storefront/Resources/views/storefront/utilities/icon.html.twig If you have overwritten the block utilities_icon please change it as follows:

Before:

...
{% set icon =  source('@' ~ themeIconConfig[pack].namespace ~ '/../' ~ themeIconConfig[pack].path ~'/'~ name ~ '.svg', ignore_missing = true) %}
...
{% set icon = source('@' ~ namespace ~ '/../app/storefront/dist/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) %}
...

After:

...
{% set icon =  source('@' ~ themeIconConfig[pack].namespace ~ '/' ~ themeIconConfig[pack].path ~'/'~ name ~ '.svg', ignore_missing = true) %}
...
{% set icon = source('@' ~ namespace ~ '/assets/icon/'~ pack ~'/'~ name ~'.svg', ignore_missing = true) %}
...