When I add a module statement in a joomla template, I always use this code :

<jdoc:include type="modules" name="left" style="xhtml" />

What does the style attribute stand for and what other styles can I use?

3 Answers 3


By default you could use the following styles:

  • none (output raw module content)
  • html5 (chosen html5 tag and font headder tags)
  • table (wraps the module in a table)
  • horz (wraps the tabled module output in a tag of another table)
  • xhtml (divs and font headder tags)
  • rounded (allows for rounded corners by wrapping in nested div tags)
  • outline (add preview information to the module)

You can also create custom functions by creating a modules.php file in your template html folder and name the function modChrome_"yourname" for example:

function modChrome_pre($module, &$params, &$attribs) {
  echo '<pre>'.$module->content.'</pre>';

And use this in your template to use this chrome style

<jdoc:include type="modules" name="left" style="pre" />

More about modules styling could be found at http://docs.joomla.org/Customising_the_way_modules_are_displayed


This may help if you're wanting to make your own Chrome styles:


  • 2
    Your link is very interesting but it would be great if you could elaborate on it so we can have the content on this beta ;)
    – web-tiki
    Apr 22, 2014 at 20:21
  • To be honest, this one is just a bit above me. I did a google search and found a few things about the chrome styles and then noticed that article on how to make your own, so I posted it. :) Steven's link though, is pretty good. It shows what would happen if you a different style, which is what the OP was asking. Harald I think deserves all the points though. His answer was a bit more thorough.
    – Brian Peat
    Apr 22, 2014 at 20:24
  • Its really funny that we have 3 answers with links to 3 diffrence joomla wiki sites talking about the same thing. Apr 22, 2014 at 20:31
  • Yeah, I noticed that. It makes it look like the joomla docs are a bit of a mess :)
    – Brian Peat
    Apr 22, 2014 at 20:32
  • 1
    BrianAPeat, thanks for the answer and the effort to get it. As @web-tiki pointed out, an elaboration would be great in the future. Tip, you can use the comment section under the question if you find something that might be useful but don't completely understand it.
    – chesedo
    Apr 23, 2014 at 4:36

This will be helpful for learning more about Module Chrome Styles:


  • 2
    Your link is very interesting but it would be great if you could elaborate on it so we can have the content on this beta ;)
    – web-tiki
    Apr 22, 2014 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.