Domanda

I have extended LUMA theme and want to customize header.

I want to add static block before logo and want to move logo to center of page which is on left side.

Final result will be

[1] static block [2] logo (in center) [3] Search form (this is already on correct position).

Please advice how to achieve this.

È stato utile?

Soluzione

You can do this by putting DIV over your logo and search box

Also create a "container" for your static block (inside this you can call your static block) in logo.phtml.

Now assign a class to each container and give them required width and float them accordingly .

So it will look like 1) Static block 2) Logo 3) Search

I hope someone else will get idea from here , as I am posting late on question .

Altri suggerimenti

you use referenceBlock logo

<referenceBlock name="logo">
        <block class="Magento\Cms\Block\Block" name="test_links">
          <arguments>
           <argument name="block_id" xsi:type="string">test_links</argument>
          </arguments>
        </block>
</referenceBlock>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top