Reputation: 33
I'm new to Sylius and I have many issues handling shop customization. My current issue is adding assets (images, css...) to my custom theme. I've tried every way but I can't figure it out. My questions are:
assets:install
and sylius:theme:assets:install
commands, but since I don't know where to put the files in the first place it didn't really help.asset()
function points to.Context
themes/SomethingTheme/SyliusShopBundle
folderI've seen similar issues on Stack Overflow but they don't seem relevant to this version of Sylius.
Upvotes: 0
Views: 1690
Reputation: 71
I've placed the public folder of my assets inside the SyliusShopBundle of the theme. These files are copied to the public folder after the command
sylius:theme:assets:install
is executed.
Here is a image to my folder structure
Here a implementation inside the theme
<div class="column">
<a href="{{ path('sylius_shop_homepage') }}"><img src="{{ asset('bundles/syliusshop/assets/logo_fitfoods.svg') }}" alt="Sylius logo" class="ui small image" /></a>
Upvotes: 2