Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I load the layout from admin module in magento
    primarykey
    data
    text
    <p>I am having a difficult time getting the MVC structure set up for an admin module I am building for Magento. What I am hoping to do is correctly set up the <code>design/adminhtml/layout/ppr_extension.xml</code> to control the content of the page. So far I am loading the phtml and scripts from the IndexController :</p> <pre><code>$this-&gt;loadLayout(); $this-&gt;_setActiveMenu('ppr_menu/first_page'); $this-&gt;_addContent($this-&gt;getLayout()-&gt;createBlock('adminhtml/template')-&gt;setTemplate('ppr/ppr_1.phtml')); $loadSimple = $this-&gt;getLayout()-&gt;getBlock('head')-&gt;addJs('ppr/load.simple.js'); $this-&gt;_addJs($loadSimple); $this-&gt;renderLayout(); </code></pre> <p>I want to load this from the config xml but for some reason I can not get this work. I imagine it has something to do with my package structure but I can not see it! </p> <p>The template file exists in design/adminhtml/default/MyPackage/ppr_1.phtml</p> <p>I tried adding this to the code/local/MyPackage/PPR/etc/config.xml</p> <pre><code>&lt;adminhtml&gt; &lt;menu&gt; ... &lt;/menu&gt; &lt;layout&gt; &lt;updates&gt; &lt;ppr_extension&gt; &lt;file&gt;ppr_extension.xml&lt;/file&gt; &lt;/ppr_extension&gt; &lt;/updates&gt; &lt;/layout&gt; &lt;/adminhtml&gt; </code></pre> <p>That extension xml is in design/adminhtml/default/default/layout/ppr_extension.xml</p> <p>I tried many things in here like :</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;layout version="0.1.0"&gt; &lt;ppr_adminhtml_ppr_index&gt; &lt;reference name="head"&gt; &lt;action method="addJs"&gt;&lt;script&gt;script.js&lt;/script&gt;&lt;/action&gt; &lt;/reference&gt; </code></pre> <p> </p> <p>No matter what I put in there nothing seems to happen. What am I missing?</p> <p>I tried moving the extension.xml to design/adminhtml/MyPackage/layout but that didnt work either. Thanks for any help.. me brain hurts!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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