Skip to content

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.
  • 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.

  1. Go to Content → Shopping Experiences.
  2. Click Create new layout → pick the Landing page type (or the same Shop page / Listing page type as your base — the type matters, see step 4).
  3. Build the layout. Save.

You now have a candidate alternative layout. Nothing about it points to a category yet — that comes next.

  1. Go to Settings → Rules → Create new rule.
  2. Name the rule, e.g. “Sales Channel B”.
  3. Add a single condition: Sales Channel = is one of = pick Sales Channel B.
  4. Save.

Step 3: Attach the rule to the alternative layout

Section titled “Step 3: Attach the rule to the alternative layout”
  1. Go back to Content → Shopping Experiences and open the layout you built in step 1.
  2. Click Layout assignment in the right sidebar.
  3. Click Assign layout.
  4. Open the Rules tab (added by this plugin).
  5. Pick Sales Channel B.
  6. Click Confirm, then Save.
  1. Go to Settings → Extensions → Advanced Layouts Assigner.

  2. Pick Sales Channel B in the sales channel switcher at the top (or leave All sales channels to apply to both).

  3. In the Replacement mode card, set Category page to All. This means any base category layout is eligible for replacement when a rule matches.

  4. 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 pageproduct_list (so listings can be replaced by other listings)
    • Shop pagepage (so shop pages can be replaced by other shop pages)
    • Landing pagelandingpage

    If your base layout is a Listing page (product_list) and your alternative is a Landing page (landingpage), add landingpage to Listing page so the plugin can use it as a replacement.

  5. Save.

  1. Open the storefront on Sales Channel A (the original). The original layout renders. ✓
  2. 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.

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.