What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello guys. Question about themes. Is it possible to have different themes for different stores in s
Hello guys. Question about themes. Is it possible to have different themes for different stores in spryker? In the docs I found only this https://documentation.spryker.com/docs/multi-theme-feature-overview. How can I specify the current theme for certain store?
And what will be the folder structure? For exmaple now I have the folder structure like on the screenshot. Does it mean that I can create another folder under Theme folder with name newTheme for example and use it for new theme?
And if yes - do I need to copy all components inside the new theme (with templates, css, js) or I can copy just css files, add additional styles and that it will be enough?
Spryker version is 202009.0.
Thanks.
Comments
-
Hi Alex. Do you really need a separate theme for each store? Maybe you can just put everything specific to the store into store module extension -
cartPage${storeName}
for example? There is an article about it - https://documentation.spryker.com/docs/t-different-stores-different-logic-landing-pages0 -
hmm... no. The logic will stay the same for all stores. There will be just another design for few new stores.
Using this logic I have to copy the Theme folder few times in few new modules. I have now DE, AT and CH sotres. I need for example 3 new additional stores - new_DE, new_AT and new_CH. And all of them will have new design. So I think I need new theme for this to avoid copying the templates, css, js 3 times.0 -
So there are two ways:
1. the way I mentioned above - Create store specific extensions -ShopUinew_DE
,CartPagenew_DE
and so on and usedefault
theme. These modules gonna have usual modules as a fallback.
2. Create separate themes and assign like thisShared/TwignewDE/TwigConfig.php
<?php namespace Pyz\Shared\Twignew_DE; class TwigConfig extends \Spryker\Shared\Twig\TwigConfig { /** * @return string */ public function getYvesThemeName(): string { return 'new-de-theme'; } }
0 -
but it is not possible to create just one theme and use in all stores, right? Without duplicating code
0 -
or in the second case i can just create folder in module and put just css files inside? without copying the templates and js. they will be used from default theme right?
0 -
in another words near the default folder i can create new-de-theme, new-at-theme etc folders and put my new styles inside. Am I right?
0 -
but it is not possible to create just one theme and use in all stores, right? Without duplicating code
It’s possible for sure. Just assign the same Yves theme for each store you need.
0 -
ah ok. now clear. thanks for your support!
0 -
Welcome and have a great day!
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random