How can I change the value of "blocks" inside "store.search.product-comparison#category"?

Taking into account a boolean condition in the Site Editor.

How can I change the value of “blocks” inside “store.search.product-comparison#category” to "flex-layout.row#custom?

{
  "store.search.product-comparison#category": {
    "blocks": [
      "flex-layout.row#default"
    ]
  },

  "flex-layout.row#default": {
    "children": ["flex-layout.col#default"]
  },
  "flex-layout.col#default": {
    "children": ["rich-text#default"]
  },
  "rich-text#default": {
    "props": {
      "text": "DEFAULT"
    }
  },

  "flex-layout.row#custom": {
    "children": ["flex-layout.col#custom"]
  },
  "flex-layout.col#custom": {
    "children": ["rich-text#custom"]
  },
  "rich-text#custom": {
    "props": {
      "text": "CUSTOM"
    }
  }
}

Hi bryamats,

This Repository may help you.

There you will find all the product-comparison config.

I hope this helps.

Regards.

Hello bryamats,

From what I understand, the flex-layout should not be sent inside the blocks. According to the documentation of the component itself, it seems correct to send it within “children”:

See the example in Step 5 - Building the Product Comparison component:

- "search-result-layout.desktop#search": {
+ "search-result-layout.desktop.product-comparison#search": {
  "children": [
    "flex-layout.row#did-you-mean",
    "flex-layout.row#suggestion",
    "flex-layout.row#banner-one",
    "flex-layout.row#searchbread",
    "flex-layout.row#searchtitle",
    "flex-layout.row#result",
+   "product-comparison-drawer"
  ],
  "props": {
    "pagination": "show-more",
    "preventRouteChange": false,
    "mobileLayout": {
      "mode1": "small",
      "mode2": "normal"
    }
  }
}