0

I have two "store view"s and I want to only add a css file to one of the views. I have noticed that you must load css files in default_head_blocks.xml. here is what is want:

        <css src="css/style.css"/>
        <!--if storeview = fa-->
        <css src="css/theme-rtl.css"/>
        <!--endif-->

2 Answers 2

0

You please refer this link may be help you.

And this link no create the two theme but store wise create the css please check this links :-

https://webkul-com.cdn.ampproject.org/v/s/webkul.com/blog/write-different-css-store-wise-magento2/amp/?usqp=mq331AQNKAGYAYakidD6rNbUOg%3D%3D&amp_js_v=a2&amp_gsa=1#referrer=https%3A%2F%2Fwww.google.com&ampshare=https%3A%2F%2Fwebkul.com%2Fblog%2Fwrite-different-css-store-wise-magento2%2F

-1

Include CSS store wise

first store

app/design/frontend/Vendor/store1/Magento_Theme/layout/default_head_blocks.xml

second store

app/design/frontend/Vendor/store2/Magento_Theme/layout/default_head_blocks.xml
3
  • thank you for your answer, but I want to do this with different "Store views" not stores. and I have currently an store installed. And Vendor fouler does not exist. Commented Mar 3, 2020 at 13:39
  • you are using a different theme for both stores? Commented Mar 3, 2020 at 13:42
  • No, theme and its Folder is same. I only want to add another CSS file to one of the store views Commented Mar 3, 2020 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.