Skip to main content

Build the table

But before we can see anything on our page we still need to build the table. By default, the places are simply loaded / displayed. So let's create our first columns so that we have some more content.

Switch to the Columns tab in the module settings and scroll down, the Table Columns radio button is our go-to place when it comes to adding new columns:

FootballManager standings noRows backend

At the beginning we just start with a predefined column "Place" when we save the module like this and look at the output in the frontend we don't get much content as expected: 

FootballManager standings noRows frontend

What do we see here? Our module has counted from 1 to 5 and created a line for us in which the placement is written, as we have set it up in the backend, so it's time to take the next step.

We create our first column

To create a new column, we click on the plus icon (whether it is the upper or the lower one) in the Table Columns option field. Now we get a new input mask below the placing column:

FootballManager standings firstRow blank

Now we choose as type (Select Column) Team (yes the other cool columns will come later):

FootballManager standings firstRow type team

If we now save the module again (top left), the whole thing in the frontend already looks a bit more like a placement table:

FootballManager standings first standingstable

Yes I know, pretty is different but we will get to that (chapter Design Table), we will now go further and create the other columns we want to have. Just click on the plus icon again. Now it makes a difference if you use the plus at the top or the icon at an item. If you use the above your column will be added at the bottom (Joomla! logic - I can't help it), if you use the plus at an item the new column will be added directly below.

In our example I have now selected the columns for Games, PA, PF as well as Pct:

FootballManager standings unstyled

You can define the column header texts directly within the column editor. Currently I have created this only for the Place, the PA/PF and the Pct field:

 FootballManager standings table col config

Note: If no column title is entered, none will be displayed in the frontend. Sounds logical and is also so...

Now we have created our first table, you will learn how to style it in the next chapter.