Joomla Metamod positioning problem

After trawling google, I came across Metamod which seemed like it would do exactly what I wanted – display modules depending on criteria I set.

I only have a smallish page, and one of my other pages was too big, and was pushing one of my modules off the side… most irritating, and my php / css skills are not good enough to get around it a clever way.. (feel free to suggest)

So Metamod seemed to allow me to say, if x then display Module y otherwise dont etc..

Great… except I ran into a problem. Metamod worked fine inasmuch as it did what it said on the tin, but the trouble I had was I couldnt get the module to not display from the normal layout. So for example, I set up a rule which said if article id != x then display module y. The trouble was when that criteria was met, i.e most of the time, it would display the module twice! Once for Metamod and once for the normal layout rules.

So I switched the module off thinking Metamod would handle it.. nope, Metamod complained about not being able to load the module.

I googled a bit (not a lot to be honest, so there is probaby a very elegant and easy solution out there!) but couldnt find anything. So I thought if I could edit the position of the module to nothing, it would be active but not displayed anywhere. 

So using mysql direct I set the position of the module to blank. Bingo, Metamod still loaded it, but because it didnt have a position it wasn’t loaded anywhere else…

Bit of a bodge workaround I fancy, but it worked for me…

You can follow any responses to this entry through the RSS 2.0 feed.

Comments

  1. On June 10, 2009 Stephen Brandon says:

    Hi,

    thanks for the mention of MetaMod, and sorry that it didn’t quite work as you expected.

    However, the answer is very simple (and documented on the MetaMod home page) — on the module editing page for the module that MetaMod will include (or not), set the module to display on “none” (i.e. on no pages). That way it doesn’t show up my itself, as you discovered. And MetaMod is quite happy to include and display the module because it’s still “published”. So MetaMod ends up with full control over when it’s displayed or not.

    This is documented on the “How to Use” section on the MetaMod page.

    There’s lots of other good stuff on that page about all kinds of things you can do with MetaMod — GeoIP, random, 1-off display, rules based on user group and much more.

    Best regards,
    Stephen Brandon
    MetaMod author

  2. On June 10, 2009 admin says:

    Thanks very much for the post Stephen.
    I did search around for a fix, but probably didnt use the correct explanation of my problem.
    I’ll give the proper method a try, as its most likely going to work better than my “work around”
    Thanks again.

  3. On June 10, 2009 admin says:

    I had another look at Metamod, and looked at the suggestion Stephen made – he should really know as he wrote it!
    I’m pleased to say it works perfectly, the mistake I had made was not realising that setting display in the menu section to none was what I needed to do.
    My fault really for not reading the how to use notes properly by the looks of things, but glad to say its all working without my bodge around 🙂
    Thanks Stephen.

  4. On September 07, 2009 Stephen Brandon says:

    Hi again,

    just wanted to let you know about the new MetaMod support site: http://www.metamodpro.com. There’s a forum (at last), some new recipes, FAQs, etc etc.

    I’ve also released MetaMod Pro, which helps solve various layout and positioning issues that occur with some templates.

    Regards,
    Stephen

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This blog is kept spam free by WP-SpamFree.