Apr
03
2008
Including modules in the main body area PDF Print E-mail

Have you ever wanted to nest a module within the main body area of your page?  For example, you might wish to wrap content around a pullquote, or wrap content around a short navigation bar.  How might one do that, considering the code simply calls for mosMainBody?  How do you get a module to fit into that?

It's actually quite easy with a built-in mambot that comes with Joomla.

You simply need to include this code where you want the module to occur:

[mosloadposition user1]

(Replace these square brackets with curly ones -- I've put them here so the line will not render in Joomla!)

This indicates that the module with position of "user1" should be loaded in this location.

The mambot's name is "Load Module Page Positions". This sample line of code appears in the description for the mambot.

Note that you can also configure what kind of "wrapper" would go around this module from within the mambot's dropdown menu:

  • Wrapped by table - column
  • Wrapped by table - horizontal
  • Wrapped by div's
  • Wrapped by multiple div's (so you could use a rounded corner technique with this)
  • No wrapping - raw output
As you have to pick a single setting for the whole site, I generally go with "no wrapping - raw output". I could then use the HTML settings within the content to put whatever HTML around that module code that I wish (or, perhaps, even none!).
 
< Prev   Next >

Gallery Photography

Login

Sponsors


Get Chitika Premium