Questions tagged [ifconfig]

The tag has no usage guidance.

1
vote
1answer
58 views

Conditionally displaying block

I have a block that replaces the default Magento login form. I would like to conditionally display it, or else revert to the default login form. I am using ifconfig to display the block if a certain ...
1
vote
0answers
46 views

ifconfig does not work in <css /> tags in Magento 2

ifconfig does not work in <css /> tags in Magento 2. 0 (Magento\Framework\Config\Dom\ValidationException): Element 'css', attribute 'ifconfig': <page xmlns:xsi="http://www.w3.org/2001/...
0
votes
1answer
305 views

How canl I set condition in layout file?

I have layout file have block like this <referenceContainer name="sidebar.additional"> <block class="Partsoto\CategoryCustom\Block\Search" name="category.custom.replacement.search" before=...
1
vote
1answer
707 views

save data from a module if save config buton is click in admin configuration

save data from a module in database if save config button is click in admin configuration. Basically I want to disabled a module if disabled from admin. Actually disable functionality is not working. ...
3
votes
1answer
386 views

How to set ifconfig for di.xml magento 2

I want set ifconfig configuration for below code: First code in di.xml <virtualType name="searchFilterList" type="Magento\Catalog\Model\Layer\FilterList"> <arguments> <...
0
votes
1answer
186 views

How to set ifconfig for move tag use in xml magento 2

I have stuck the set configuration with ifconfig element for move tag. I was tried but no luck. you can see below code where i want to put ifconfig element: <move element="catalog.leftnav" ...
1
vote
3answers
844 views

How do i get enable /disable value from Magento admin?

I have created a module, where admin can enable/disable and also select any value from select options. Now I want this data to check that values, and according to that I want to give some conditions ...
1
vote
2answers
1k views

How to get the path of config status for (ifconfig=“ ”) xml - Magento 1.9

I want to know how we get the path of a config status for a natif and a custom module. Assuming that i want to get a config path of: 1) System>Configuration>Design>View demo store warning message> ...
1
vote
1answer
763 views

Magento 2 How to Remove a Top Link Using Layout ifconfig

In Magento 2 how can I remove a link from top.links via layout? I am assuming you can do this because every link is block in the top.links node is a its own block. This is was a question I had ...
9
votes
2answers
6k views

Is this if-else-condition possible in layout XML?

I want to display two different CSS <action method="addItem" ifconfig="module/general/enable"> <type>js_css</type> <name>module/app.css</name> </action> ...
16
votes
1answer
8k views

Magento 2 - ifconfig in layout xml

I'm working with magento 2. I can use ifconfig attribute in the block code, and it works well. <block class="Magento\Catalog\Block\Category\View" name="category_desc_main_column" template="...
6
votes
2answers
1k views

How to use ifconfig multiple times in one action?

How to use ifconfig two times in one action? <action method="setTemplate" ifconfig="example/general/enabled"> <template>example/catalog/product/view/examples.phtml</template> &...
3
votes
1answer
889 views

ifconfig in layout xml for enable disable when change file .phtml

Good evening, I have some problems with my module. I am using the ifconfig option in my .xml module in the theme folder layout, and my option in the admin (ENABLE / DISABLE) works, but to disable are ...