Is it possible to change the structure of a Magento page (say, a product category page) dynamically using a system variable that was set on our own module? I want my default layout for my category to appear in my own module admin panel. So I donβt have to deal with these confusing XML layout files every time I want to change my default layout for a particular magenta page.
I know that in the phtml file we could just call our own module system variable by calling Mage::getStoreConfig('module/scope/...')
to use this system variable. but what if we want to use this system variable to change the whole layout, which is set by default in the XML layout file.
I see no way to pull the value of this system variable in the XML layout file.
But I'm sure there must be a proper way to do this. So far this is the closest key that I have
Magento - xml layouts, specify value for ifconfig?
But, nevertheless, I could not find a direct answer to what I really want to achieve
this is the contents of my config.xml
<config> <modules> <Prem_Spectra> <version>0.1.0</version> </Prem_Spectra> </modules> <global> <models> <spectra> <class>Prem_Spectra_Model</class> </spectra> </models> <helpers> <prem_spectra> <class>Prem_Spectra_Helper</class> </prem_spectra> </helpers> </global> </config>
Kamal source share