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

"It is what it is" in French

how to add 1 milliseconds on a datetime string?

Is it possible to eat quietly in Minecraft?

Short story about a group of sci-fi writers sitting around discussing their profession

In a script how can I signal who's winning the argument?

Using paddles to support a bug net

How can I tell if there was a power cut when I was out?

Historicity doubted by Romans

Where is this photo of a group of hikers taken? Is it really in the Ural?

Why is a dedicated QA team member necessary?

High income and difficulty during interviews

Can a character with a low Intelligence score take the Ritual Caster feat and choose the Wizard class?

I have a domain, static IP address and many devices I'd like to access outside my house. How do I route them?

What is the spanish equivalent of "the boys are sitting"?

Why are there not any MRI machines available in Interstellar?

What's the 1 inch size square knob sticking out of wall?

Are glider winch launches rarer in the USA than in the rest of the world? Why?

Using "Kollege" as "university friend"?

Why did NASA use Imperial units?

Why did computer video outputs go from digital to analog, then back to digital?

Can you drop a weapon/item when it is not your turn?

Sometimes you are this word with three vowels

Why is chess failing to attract big name sponsors?

What would be the side effects on the life of a person becoming indestructible?



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

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

Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?