Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento changes layout dynamically via system variable
    text
    copied!<p>Is there a way we could changes the layout of a Magento page (let's say a product category page) dynamically by using system variable which have been set on our own module? I want to be able to set my category page's default layout via my own module admin config panel. So that I don't have to deal with those confusing XML layout file each time I want to change my default layout for a certain magento page.</p> <p>I know, on a phtml file, we could simply call our own module's system variable by calling <code>Mage::getStoreConfig('module/scope/...')</code> to use that system variable. but what if we want to use that system variable to change the whole layout which is set on the XML layout file by default. </p> <p>I don't see any ways to pull that system variable value on the XML Layout file.</p> <p>But I'm pretty sure there must be a right way to do that. So far, this is the closest clue that I've got</p> <p><a href="https://stackoverflow.com/questions/5596193/magento-xml-layouts-specify-value-for-ifconfig">Magento - xml layouts, specify value for ifconfig?</a></p> <p>But, still, I couldn't find any direct answer for what I really want to achieve</p> <p>this is the content of my config.xml</p> <pre><code>&lt;config&gt; &lt;modules&gt; &lt;Prem_Spectra&gt; &lt;version&gt;0.1.0&lt;/version&gt; &lt;/Prem_Spectra&gt; &lt;/modules&gt; &lt;global&gt; &lt;models&gt; &lt;spectra&gt; &lt;class&gt;Prem_Spectra_Model&lt;/class&gt; &lt;/spectra&gt; &lt;/models&gt; &lt;helpers&gt; &lt;prem_spectra&gt; &lt;class&gt;Prem_Spectra_Helper&lt;/class&gt; &lt;/prem_spectra&gt; &lt;/helpers&gt; &lt;/global&gt; &lt;/config&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload