I’ve finally had enough of dreading to write all the configuration for each custom module, and invested a couple of hours into this:
http://unirgy.com/wiki/uscaffold
Feedback is welcome as always!
I’ve finally had enough of dreading to write all the configuration for each custom module, and invested a couple of hours into this:
http://unirgy.com/wiki/uscaffold
Feedback is welcome as always!
So you’d like users of your extension to know which version it is, so you can give them support, without asking them to open extension files?
In your helper add this method:
public function addAdminhtmlVersion($module)
{
$layout = Mage::app()->getLayout();
$version = (string)Mage::getConfig()
->getNode("modules/{$module}/version");
$layout->getBlock('before_body_end')->append(
$layout->createBlock('core/text')->setText('
<script type="text/javascript">
$$(".legality")[0].insert({after:"'.$module.' ver. '.$version.'<br/>"});
</script>
')
);
return $this;
}
And in your controller action, add the method call:
// ADD:
Mage::helper('yourhelper')->addAdminhtmlVersion('Your_Module');
// BEFORE:
$this->renderLayout();
Now on admin pages that were introduced by your module it will show “Your_Module ver. 1.2.3″ right above the Magento version.