Skip to main content

Questions tagged [ifconfig]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
519 views

Hide customer navigation links based on user group

I would like to hide link in user account customer_account.xml based on role they are in. Let say we have group B2B and i want to hide block customer-account-navigation-product-reviews-link. To remove ...
user2217288's user avatar
0 votes
1 answer
212 views

Generate the block with two ifconfig condition in layout xml

I prepared a code which masks the phone field. Since on some of our customer's website the customer does not enter input for phone field on register page, i need to put second condition to render this ...
Y.Yuksel's user avatar
1 vote
0 answers
47 views

Hide tab on product page on certain condition in magento 2.3.3

I am trying to use ifconfig to hide a tab but it is not working properly below is my code please check <?php namespace Afg\Hidetab\Block; class hidetab extends \Magento\Framework\View\Element\...
Mustafa Ali's user avatar
1 vote
1 answer
757 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 ...
Ynhockey's user avatar
  • 265
1 vote
0 answers
148 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/...
Eugene Kapelko's user avatar
2 votes
1 answer
2k 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=...
stevieki's user avatar
1 vote
1 answer
2k 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. ...
Aman Deep's user avatar
4 votes
1 answer
1k 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> <...
Kartik Asodariya's user avatar
0 votes
1 answer
388 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" ...
Kartik Asodariya's user avatar
1 vote
3 answers
2k 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 ...
onlyfordigitalworld's user avatar
1 vote
2 answers
3k 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> ...
PЯINCƎ's user avatar
  • 11.7k
1 vote
1 answer
962 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 ...
André Ferraz's user avatar
9 votes
2 answers
9k views

Magento 1 - 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> ...
Newbie's user avatar
  • 1,614
21 votes
2 answers
23k 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="...
skynetch's user avatar
  • 1,662
6 votes
2 answers
2k 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> &...
ND17's user avatar
  • 5,181
3 votes
1 answer
1k 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 ...
Matheus Silva Itep's user avatar