Home > Magento, Programming > Module Manager Update, now on Google Code!

Module Manager Update, now on Google Code!

January 31st, 2010

I recently updated Module Manager (first post) to support nested modules and renamed the .modman definitions file to simply modman for easier editing in IDEs. To top it off I am officially releasing it to the public under the Apache License 2.0 so that you may start using it in your own projects.

Additionally, Module Manager now has it’s own home on Google Code so check it out! (pun intended)

Here is an example of the new nested modules feature:

# My template files
skin               skin/frontend/my/default
design             app/design/frontend/my/default

# Import Colin_HotDealz module
@import            modules/Colin_HotDealz

Magento, Programming , , ,

  • http://colin.mollenhour.com/2009/10/17/module-manager-for-when-svnexternals-just-doesnt-cut-it/ Colin Mollenhour’s Technical Blog » Module Manager – for when svn:externals just doesn’t cut it.

    […] Update 1/30/2010: Added nested modules, renamed .modman file to modman, released under Apache License 2.0, and hosted on Google Code. […]

  • Jason Williams

    Hi Colin,

    Have been playing with this script for a short time now and really like what you've done. I may be missing something but is there a reason why you didn't include a option to remove a module, i.e. delete all symlinks that have been created?

    Thanks, Jase

  • http://colin.mollenhour.com Colin Mollenhour

    There isn't really a need for it since if you simply delete the module's directory under .modman and then update a module or run the repair command you get the same net effect since the broken symlinks are then cleaned up automatically.

  • Jason Williams

    Thanks Colin. I stumbled across the repair option a little while after I'd posted my comment. The only issue I see now is Magento's darn 1.4.2.0 security 'fix' update, which I've just discovered. Joy.

  • http://colin.mollenhour.com Colin Mollenhour

    Jason, there is an issue reported to hopefully get this fixed in a

    future release.

    http://www.magentocommerce.com

    From what I can tell so far the “fix” requires developer mode which is

    no fix at all. Please show your support for a better fix in the comments

    on that issue.

    Fortunately, overriding the Mage_Core_Block_Template class to remove the

    rather lame security enhancement is quite easy.

  • Jason Williams

    Yes, I had read the support issue but you've reminded me to add a comment to support a better fix that this silly developer mode approach Varien are planning to take.

    I have just hit that point where I need to add a simple override Module to fix the Template class as am just working with a new project which is the first (of many) that I plan to use modman.

  • Jason Williams

    Hi Colin,

    I could be being daft here (strong possibility as am sleep deprived by having very young baby at home) but how did you implement your override of Mage_Core_Block_Template class? In most cases this class is extended by other classes and as far as I can see Magento doesn't perform any overridden when a class is itself extended. I think I'm missing something simple here – any pointers would be much appreciated. Thanks.

  • http://colin.mollenhour.com Colin Mollenhour

    Jason, Magento uses PHP's include path when loading class files. The

    app/code/local and app/code/community both come before app/core/core in

    the include path so you can symlink an edited Template.php to

    app/code/local/Mage/Core/Block/Template.php and Magento will load your

    copy instead of the original copy.

  • Jason Williams

    Colin,
    Thanks for the quick response. I now have it working with modman managing the symlink to my version Template.php which fixes the problem with Magento and sym links. Sweetly ironic. J

  • john k

    Have you tried this in Magento 1.4.2 (or in my case EE 1.9.1.1)?

    I found I had to hack the core “template.php” file because it was no longer allowing template files to be included if it was in symlink outside of the actual “design” directory.

  • http://colin.mollenhour.com Colin Mollenhour

    Yes, that is correct, 1.4.2 requires a modification be made for modman

    to work due to the new template “security”.. See more info here:

    http://www.magentocommerce.com

  • http://www.franklinstrube.com Franklin Strube

    Colin,

    I've been using modman for a month or so now, and it has made my Magento workspace much cleaner. However, one thing that got me down was not having my Linux terminal auto-complete my modman commands.

    The following bash_completion script will provide auto-completion functionality for modman. Just throw it in /etc/bash_completion.d/modman or append it to ~/.bash_completion and you are good to go.

    http://www.franklinstrube.com/

  • http://colin.mollenhour.com Colin Mollenhour

    Excellent! I was just looking at implementing bash completion for modman

    a couple days ago but did not have any time to spare for it. Thanks for

    sharing!