QuestionQ18

Adobe Experience Manager Sites

An Adobe Commerce developer has created the following system-configuration field:

Question Image

Using Layout XML, how can a block’s visibility be controlled by this system configuration?

  • A <block name="block.name" template="Vendor_Module::template.phtml" ifconfig="vendor/general/enable" />
  • B <block name="block.name" template="Vendor_Module::template.phtml" ifconfig="module/general/enable" />
  • C <block name="block.name" template="Vendor_Module::template.phtml" ifconfig="general/module/enable" />
Explanation

The ifconfig layout XML attribute controls block visibility from a system configuration field and takes that field’s XPath. The configuration field is located at section module, group general, and field enable, giving the path module/general/enable.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!