Magento 2 - Passing argument from backoffice in Category Layout Update XML to moduleCustom Layout Update XML on a categoryCategory Custom Layout Update XML - MagentoMagento Set Selected Filter In Layered NavigationMagento 2: Passing Variables from Controller Action to “View”Magento 2 - Admin Layout XML - Update Template and change block type for specific categoryMagento2: Set specific theme in layout XML - example checkout_index_indexCategory Layout Update - Custom Product List TemplateHow to pass value to Input KnockoutJS attr via xmlLayout Update XML for category not working - Magento 2.2.2Product's “Layout Update XML” code disappears from the site every 24 hours

Why is chess failing to attract big name sponsors?

Why are off grid solar setups only 12, 24, 48 VDC?

Is it legal for private citizens to "impound" e-scooters?

Other than a swing wing, what types of variable geometry have flown?

(1 of 11: Numberlink) What is Pyramid Cult's Favorite Activity?

How to judge a Ph.D. applicant that arrives "out of thin air"

How can I receive packages while in France?

What do teaching faculty do during semester breaks?

Can two figures have the same area, perimeter, and same number of segments have different shape?

USA: Can a witness take the 5th to avoid perjury?

How may I concisely assign different values to a variable, depending on another variable?

How do we explain the E major chord in this progression?

Trapped in an ocean Temple in Minecraft?

Creating Darkness

Terence Tao–type books in other fields?

What to do when you reach a conclusion and find out later on that someone else already did?

Why was Sauron not trying to find the Ring, and instead of preparing for war?

401(k) investment after being fired. Do I own it?

Why no ";" after "do" in sh loops?

What causes long-running disputes over sovereignty?

What is the difference between 1/3, 1/2, and full casters?

Send a single HTML email from Thunderbird, overriding the default "plain text" setting

How can I prevent corporations from growing their own workforce?

Time travel novel: machine makes clones, clones battle to be the one to get back their life



Magento 2 - Passing argument from backoffice in Category Layout Update XML to module


Custom Layout Update XML on a categoryCategory Custom Layout Update XML - MagentoMagento Set Selected Filter In Layered NavigationMagento 2: Passing Variables from Controller Action to “View”Magento 2 - Admin Layout XML - Update Template and change block type for specific categoryMagento2: Set specific theme in layout XML - example checkout_index_indexCategory Layout Update - Custom Product List TemplateHow to pass value to Input KnockoutJS attr via xmlLayout Update XML for category not working - Magento 2.2.2Product's “Layout Update XML” code disappears from the site every 24 hours






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















In Magento 1 I sometimes used this way to pass an argument to a category, directly from the back office




Category > Custom Design tab > XML Design Update




<reference name="product_list">
<action method="setData"><key>giftCardId</key><value>955</value></action>
</reference>


Could you tell me what will be the equivalent syntax in Magento 2, Using the same way:




Category > Design > Layout Update XML




The main idea is to pass a value for a specific category, that could be retrieved in a custom module in frontend.



Edit: I know that I can add a custom category attribute to do that too, but the point is really, does an equivalent syntax exists.










share|improve this question
























  • why are you not adding this thing in your module layout xml? you can pass data in block xml and retrieve in template

    – bhargav shastri
    Jul 10 at 10:39












  • @bhargavshastri because i want the magento store owner to change this parameter without my help, and it should be different for different categories

    – ffab
    Jul 10 at 12:09


















1















In Magento 1 I sometimes used this way to pass an argument to a category, directly from the back office




Category > Custom Design tab > XML Design Update




<reference name="product_list">
<action method="setData"><key>giftCardId</key><value>955</value></action>
</reference>


Could you tell me what will be the equivalent syntax in Magento 2, Using the same way:




Category > Design > Layout Update XML




The main idea is to pass a value for a specific category, that could be retrieved in a custom module in frontend.



Edit: I know that I can add a custom category attribute to do that too, but the point is really, does an equivalent syntax exists.










share|improve this question
























  • why are you not adding this thing in your module layout xml? you can pass data in block xml and retrieve in template

    – bhargav shastri
    Jul 10 at 10:39












  • @bhargavshastri because i want the magento store owner to change this parameter without my help, and it should be different for different categories

    – ffab
    Jul 10 at 12:09














1












1








1








In Magento 1 I sometimes used this way to pass an argument to a category, directly from the back office




Category > Custom Design tab > XML Design Update




<reference name="product_list">
<action method="setData"><key>giftCardId</key><value>955</value></action>
</reference>


Could you tell me what will be the equivalent syntax in Magento 2, Using the same way:




Category > Design > Layout Update XML




The main idea is to pass a value for a specific category, that could be retrieved in a custom module in frontend.



Edit: I know that I can add a custom category attribute to do that too, but the point is really, does an equivalent syntax exists.










share|improve this question
















In Magento 1 I sometimes used this way to pass an argument to a category, directly from the back office




Category > Custom Design tab > XML Design Update




<reference name="product_list">
<action method="setData"><key>giftCardId</key><value>955</value></action>
</reference>


Could you tell me what will be the equivalent syntax in Magento 2, Using the same way:




Category > Design > Layout Update XML




The main idea is to pass a value for a specific category, that could be retrieved in a custom module in frontend.



Edit: I know that I can add a custom category attribute to do that too, but the point is really, does an equivalent syntax exists.







magento2 layout category






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 16 at 18:30







ffab

















asked Jul 10 at 10:05









ffabffab

267 bronze badges




267 bronze badges












  • why are you not adding this thing in your module layout xml? you can pass data in block xml and retrieve in template

    – bhargav shastri
    Jul 10 at 10:39












  • @bhargavshastri because i want the magento store owner to change this parameter without my help, and it should be different for different categories

    – ffab
    Jul 10 at 12:09


















  • why are you not adding this thing in your module layout xml? you can pass data in block xml and retrieve in template

    – bhargav shastri
    Jul 10 at 10:39












  • @bhargavshastri because i want the magento store owner to change this parameter without my help, and it should be different for different categories

    – ffab
    Jul 10 at 12:09

















why are you not adding this thing in your module layout xml? you can pass data in block xml and retrieve in template

– bhargav shastri
Jul 10 at 10:39






why are you not adding this thing in your module layout xml? you can pass data in block xml and retrieve in template

– bhargav shastri
Jul 10 at 10:39














@bhargavshastri because i want the magento store owner to change this parameter without my help, and it should be different for different categories

– ffab
Jul 10 at 12:09






@bhargavshastri because i want the magento store owner to change this parameter without my help, and it should be different for different categories

– ffab
Jul 10 at 12:09











0






active

oldest

votes














Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281535%2fmagento-2-passing-argument-from-backoffice-in-category-layout-update-xml-to-mo%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281535%2fmagento-2-passing-argument-from-backoffice-in-category-layout-update-xml-to-mo%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form