I understand it’s in theory possible to use system config to determine the layout of a page (with the ifconfig option), is it possible to do something similar with variables passed by get or post? Or a cookie value for that matter?
I understand it’s in theory possible to use system config to determine the layout
Share
This is not possible in standard Magento.
Depending on your use case there are some ways:
Implement an own XML attribute, for example
<action method="foo" ifrequestvar="...">The modle Aoe_LayoutConditions could give you a starting point:Add an own layout handle. i.e. you check your condition that should be meet in normal PHP code (that works if the condition, i.e. the value of your
$_REQUESTvar is always the same) and then you can use this layout handle in the layout XML. You can add layout handles in an observer as shown in N98_CustomLayoutHandles.