Skip to content

Commit

Permalink
corrected path to logo template and overridden file code
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-wozniak authored and Zales0123 committed Jul 23, 2021
1 parent 1b0a5ed commit a50af87
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions docs/getting-started-with-sylius/shop-customizations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Default logo in shop panel:
The first step is to detect which template is responsible for displaying the logo and therefore which should be overridden
to customize a logo image.

It's placed in **SyliusShopBundle**, at ``Resources/views/_header.html.twig.path``, so to override it,
you should create the ``templates/bundles/SyliusShopBundle/_header.html.twig`` file and copy the original file content.
It's placed in **SyliusShopBundle**, at ``Resources/views/Layout/Header/_logo.html.twig.path``, so to override it,
you should create the ``templates/bundles/SyliusShopBundle/Layout/Header/_logo.html.twig`` file and copy the original file content.
Next, replace the ``img`` element source with a link to the logo or properly imported asset image (take a look at
`Symfony assets documentation <https://symfony.com/doc/current/best_practices/web-assets.html>`_ for more info).

Expand All @@ -38,18 +38,8 @@ At the end of customization, the overridden file would look similar to this:

.. code-block:: twig
<div class="ui basic segment">
<div class="ui three column stackable grid">
<div class="column">
<a href="{{ path('sylius_shop_homepage') }}"><img src="{{ asset('assets/logo.png') }}" alt="Logo" class="ui small image" /></a>
</div>
<div class="column">
{{ sonata_block_render_event('sylius.shop.layout.header') }}
</div>
<div class="right aligned column">
{{ render(url('sylius_shop_partial_cart_summary', {'template': '@SyliusShop/Cart/_widget.html.twig'})) }}
</div>
</div>
<div class="column">
<a href="{{ path('sylius_shop_homepage') }}"><img src="{{ asset('assets/logo.png') }}" alt="Logo" class="ui small image" /></a>
</div>
A custom logo should now be displayed on the Shop panel header:
Expand Down

0 comments on commit a50af87

Please sign in to comment.