Easy tricks to remove many tables from the standard output of Joomla!


Easy tricks to remove many tables from the standard output of Joomla!

Post by vavroom » Thu Dec 15, 2005 9:31 pm

Many people are asking how to get a Joomla! site without tables.  While you can't get rid of *all* the tables, you can certainly remove a lot of them without doing core hacks, with simple techniques that are available now.

With the few tables left, you can easily get your site to validate XHTML and CSS, and almost WAI 1.0 Priority 1.

Note that this post is about removing as many tables as you can without hacking files.  It is not about accessibility per se.  It also does not address 3rd Party components.

The first thing to do is to design your template/theme without table.  This means your /template/template_name/index.php relies on CSS for layout rather than tables.  That's up to you do accomplish :)

The second thing to do is to call the module with one of three "switches".

First switch:  -1
Strips all surrounding code from the module.

Second switch: -2
Puts the module's title in a h3, and wraps the entire thing in a

Third switch: -3
Puts the module's title in a h3, and ads several layers of divs that can be used to apply CSS techniques with rounded corners

This is how you apply the switch:

Code: Select all

<?php mosLoadModule ( 'user1', -2 ); ?>
Note that this applies only to modules, not to mosMainBody (which makes calls to com_content, not to modules).

The third thing to do is to get your menus displayed in Flat lists.

When you go to your module administration, select the menu(s) module(s).  In the options, you can select Horizontal, Vertical, or Flat List.  The first two options deliver your menu in a table.  The third delivers the menu in a

Note, if you have several layers to your menu, the build in flat list will not display the child elements.  If you need to display child elements, you can use a 3rd Party module called Extended Menu.  See http://forum.joomla.org/index.php/topic,10389.0.html for more information about Extended Menu (note, while I haven't had problems using this module, it is not an official Joomla! module)


I hope that these three little "tricks" help you along the way.

If you know of other easy ways to discard tables, please feel free to follow up here.
(Mod Edit) : http://forum.joomla.org/index.php/topic,96815.0.html

Mod note:  Split off posts for discussion.
Last edited by Jenny on Wed Sep 20, 2006 10:27 pm, edited 1 time in total.


Return to “Design and Accessibility - Archived”