First layout replacement
This page walks you through the minimum end-to-end setup: replace the homepage layout on Sales Channel B, while keeping the original homepage on Sales Channel A. Both sales channels share the same category tree.
By the end you will have:
- A second CMS layout in Shopping Experiences.
- A rule that matches only on Sales Channel B.
- The rule attached to the second layout.
- Plugin settings configured so the swap happens.
Prerequisites
Section titled “Prerequisites”- Two sales channels, both pointing at the same root navigation category.
- That root navigation category has a CMS layout assigned (the base — for example Default category layout).
- The plugin is installed and activated.
If the root category has no CMS layout, assign one first. Without a base layout, the plugin has nothing to replace — see How it works.
Step 1: Build the alternative layout
Section titled “Step 1: Build the alternative layout”- Go to Content → Shopping Experiences.
- Click Create new layout → pick the Landing page type (or the same
Shop page/Listing pagetype as your base — the type matters, see step 4). - Build the layout. Save.
You now have a candidate alternative layout. Nothing about it points to a category yet — that comes next.
Step 2: Create the rule
Section titled “Step 2: Create the rule”- Go to Settings → Rules → Create new rule.
- Name the rule, e.g. “Sales Channel B”.
- Add a single condition: Sales Channel = is one of = pick Sales Channel B.
- Save.
Step 3: Attach the rule to the alternative layout
Section titled “Step 3: Attach the rule to the alternative layout”- Go back to Content → Shopping Experiences and open the layout you built in step 1.
- Click Layout assignment in the right sidebar.
- Click Assign layout.
- Open the Rules tab (added by this plugin).
- Pick Sales Channel B.
- Click Confirm, then Save.
Step 4: Configure the plugin
Section titled “Step 4: Configure the plugin”-
Go to Settings → Extensions → Advanced Layouts Assigner.
-
Pick Sales Channel B in the sales channel switcher at the top (or leave All sales channels to apply to both).
-
In the Replacement mode card, set Category page to All. This means any base category layout is eligible for replacement when a rule matches.
-
In the Replacement types card, make sure the row matching your base layout type lists the alternative layout’s type. The post-install defaults are:
- Listing page →
product_list(so listings can be replaced by other listings) - Shop page →
page(so shop pages can be replaced by other shop pages) - Landing page →
landingpage
If your base layout is a
Listing page(product_list) and your alternative is aLanding page(landingpage), addlandingpageto Listing page so the plugin can use it as a replacement. - Listing page →
-
Save.
Step 5: Verify
Section titled “Step 5: Verify”- Open the storefront on Sales Channel A (the original). The original layout renders. ✓
- Open the storefront on Sales Channel B. The alternative layout renders. ✓
If the alternative doesn’t show on Sales Channel B:
- Re-check that the category has a base layout assigned (step 0).
- Re-check that the rule contains only the Sales Channel condition (step 2).
- Re-check that the rule is attached to the alternative layout (step 3).
- Re-check that the replacement mode and types allow it (step 4).
- See Troubleshooting.
What you’ve just built
Section titled “What you’ve just built”You’ve used the plugin to do something Shopware can’t do alone: serve two different layouts for the same category across two sales channels, with no category duplication.
From here you can:
- Add a second rule for a different sales channel, and attach it to a third layout. Repeat per channel.
- Add a date range or customer group condition to schedule the alternative.
- Build separate alternatives for the homepage, listings and product pages, and attach the same rule to each. See the multi-sales-channel recipe for the full walkthrough.