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

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?