4

I have made the custom category layout update named as catalog_category_view_selectable_3_Test.xml in Magento_Catalog/layout.

When I checked in admin panel in custom layout update the options is not showing.

enter image description here

Kindly provide a solution to custom layout update for category for magento 2.4.

asked Mar 16, 2021 at 13:24
8
  • 1
    hi there, can you also share the content of your custom layout file? Commented Mar 16, 2021 at 13:58
  • Sure @DianaBotean <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="breadcrumbs" remove="true"/> </body> </page> Commented Mar 17, 2021 at 4:01
  • looks good, i can't see anything wrong with that content. Commented Mar 17, 2021 at 6:47
  • @DianaBotean yes, but the custom update handle is not working. Any possible other solutions? Commented Mar 17, 2021 at 7:17
  • at the moment i don't see anything wrong with the content or the filename tbh. did you try to add this for another category ID? see if the behavior is still the same? Commented Mar 17, 2021 at 8:18

3 Answers 3

5

I had some "issue" with Magento-2.4.2 and I had spent about 2 hours before I understood what I was Pinocchio )) I was checking the wrong scope - All Stores Views instead of current store with applied theme ))). Maybe my bad experiences save time anybody

Msquare
9,4627 gold badges30 silver badges71 bronze badges
answered Aug 12, 2021 at 14:52
1
  • Right, I had the same issue. What this answer means is: The custom layout update is not shown while editing the category in the "All store views" scope. Instead we must switch to the store view for which we want to apply the custom layout update. Commented Jun 4 at 9:08
1

If the custom selectable layout is not being shown in the custom layout dropdown then the layout file is not being recognized.

Make sure your catalog_category_view_selectable_3_Test.xml file does not have any additional or trailing spaces in the filename.

Tested with 2.4.2

app/design/frontend/Vendor/Theme/Magento_Catalog/layout/catalog_category_view_selectable_3_Test.xml

enter image description here

If you can't see the option in the dropdown, then try after clearing the cache.

Knight017
6429 silver badges24 bronze badges
answered Mar 16, 2021 at 15:25
3
  • Hey @Paj , The file name doesn't have any additional space or trailing spaces in the filename. Commented Mar 17, 2021 at 4:02
  • 1
    I tested the exact same filename on 2.4.2 and it worked correctly. Are you adding this to a theme or module? I tested with App/Design/FrontendVendor/Theme/Magento_Catalog/layout/catalog_category_view_selectable_3_Test.xml Commented Mar 17, 2021 at 7:36
  • I have added it in the theme. Commented Mar 17, 2021 at 8:41
0

This may be related to: How to add/update custom layout update on magento 2.3.4

I am using the Porto child theme on 2.4.2 and the no options were displayed in the category Custom Layout Dropdown (Not even - No Update). Applied @Marrbacca solution and it got the options to display - although so far, the selection does not seem to behave an effect on the frontend. :/

Msquare
9,4627 gold badges30 silver badges71 bronze badges
answered Mar 19, 2021 at 18:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.