Hello,
does any body knows how to add text where marked blue circle and red tekstas ,,, in this picture:
In your theme folder, go to default.xnl, add the below tags,
<referenceBlock name="header.links"> <block class="Namespace\customModule\Block\Link" name="add-new-header-link"> <arguments> <argument name="label" xsi:type="string" translate="true">New Link</argument> <argument name="path" xsi:type="string" translate="true">new-link</argument> </arguments> </block> </referenceBlock>
flush the cache and check
Thanks!!
You need to create static block, called static block via XMLfile.
You need to create a default.xml file to call every page in a site.
<referenceContainer name="header.panel"> <block class="Magento\Cms\Block\Block" name="header-text" before="top.links"> <arguments> <argument name="block_id" xsi:type="string">header-text</argument> </arguments> </block> </referenceContainer>
Create Static Block header-text and add your content inside this CMS block.
this file should be in app/design/frontend/vendor/theme?
created block with header-text identifier puted there sample text, without any html, flushed magento chache, but nothing shows at frontend...
Your file path would be,
app/design/frontend/vendor/theme/Magento_Theme/layout/default.xml
Did this, but didint show any text...