Displaying your EasyTable
- Details
- Category: 1.1
- Published on Wednesday, 01 August 2012 09:26
- Written by Craig Phillips
- Hits: 882
This article refers EasyTable Pro! 1.1.0+ for Joomla! 2.5, see here for EasyTable Pro! 1.0.0 and Joomla! 1.5.
So you've created your first table now how do you show it to the world, well your web sites users anyway.
Menus?
Like a lot of Joomla! components the content is displayed by a direct menu link. So the first thing to do after creating and publishing your EasyTable is to create a menu that links to your table. The easiest way to do this in Joomla! 2.5+ is to create the menu item directly in the menu you want it to appear, so from the Menus menu selcet the desired menu and the select Add New Menu Item, like so:

Menu Type
As with all menu items in Joomla! you must select a menu type, in fact it's the first option in the Details section of the new menu item.

Clicking the Select button will show you all of the menu item types available in your installation of Joomla! — as the choices are ordered based on what is installed the exact postion of the EasyTable Pro! menu items may be in a different location from the screen image show below. If you have several extensions that add additional menu item types then you may need to scroll the menu item listing to reveal the one you're after.

As you can see, from the screen shot above, there are several options available for EasyTable Pro!
List Layout
The List Layout is like most other menu items in Joomla and has the standard Title field. This the first step that you will need to complete. As with other Joomla menus you can also specify where in the menu heirarchy the menu item will appear.
The list layout shows you a list of all published tables, as you can see on the reference website.
Table lists have a basic parameter that lets you sort this list by the tables name, creation date or modification date. The default setting is by Name in Ascending order, all sort types can be done in either ascending or descending order.

With the advent of Joomla! 1.6+ a new access control system was implemented which allows EasyTable Pro! to limit what tables are shown in the list. In addition, as some users have lots (and by lots we mean hundreds) of tables the listing now supports Joomla!'s global list settings and paginates the list accordingly (if you want).

Show Tables
The table list will only show published tables, however, you can control which tables are shown based on the users logged in state.
- Show To All - All tables will be listed but some tables may show a locked icon if they are restricted. (This is how it worked in Joomla! 1.5)
- Show All To Logged In Users - All tables will be listed if a user is logged, but some tables may show a locked icon if the user is not in the correct viewing group.
- Show To Allowed Groups - The Table list will only show tables to users if they are in the right group. Public tables will be listed for all users.
N.B. If there are no Public tables and no tables in the current users group then the list could appear to be empty.
Show Skipped Tables
If tables are hidden from a user because they are not logged in or don't have the right privilledges the last element of the table list will display a breif message indicating how many tables are not visible if this option is set to Yes.
Table Layout
If you want to display a table you will choose either the standard Table Layout or the new Table Layout (Ranked). The Ranked layout is useful for displaying tables that have a value you want to rank records by, e.g. NBA Player Points or your local football divisions ranking or a set of comparible products.
The Table Layout is like most other menu items in Joomla and has the standard Title field. This the first step that you will need to complete. As with other Joomla menus you can also specify where in the menu heirarchy the menu item will appear.
The next step will be selecting a table to display from the Required Settings panel on the top right of the Edit Menu Item screen. If you have some published tables it will look something like the screen shot below:

Once you've selected the table you must Save it - doing that step allows Joomla! to then display the Table Options relevant to the table you've selected, as shown below:

- Select Sort Field - The field you want to sort the table by. (You must save the table choice before you can select the field)
- Sort Field Order - The order (Ascending/Descending) to sort the field by.
- Select Field To Filter - The field you want to filter table records by.
- Enter Filter Value - In this input field you place the text you want to match table records with (in our example you can see that we are matching the Party field against the value Democrat).
- Alternative Layout - Use a different layout from the supplied EasyTable Pro! view or overrides in the templates. If you template provides alternate EasyTable Pro layouts or you've created and installed one they will appear in this menu.

From these settings the US Presidents table will be filtered to just show Presidents that have a value that contains the text "Democrat" - you can see this on the demo web site.
Table Layout (Ranked)
Using a Ranked layout with your table requires two settings to make it work:
- Sort Field & Order
- Ranked Layout

Both of these can be specified in either the table or the menu item you're using to display the table. If you specify the Sort Field in the table itself then all you have to do in the menu is select Table Layout (Ranked) for the Menu Type (as shown above).
If you do specify a Sort Field and Sort Field Order in the menu it will replace the values set in the table. This can be handy if you have several columns that you want to display the table ranked against (e.g. player rating, season points or number of fouls).
The Sort Field Order is used to determine the order of ranking. If you want the row with the highest value to get a rank of 1 you would set the Sort Field Order to Descending. If you want the row with the lowest value to get a rank of 1 you would set the Sort Field Order to Ascending. For the example NBA Rankings table on the demo web site, we've used the following settings in the Menu Item options:

It is important to remember that the RANK value must be calculated against all of the records in your table, this means your database server is doing all of the work on each table request. The larger the table the more work and RAM that will be required by your server. For these reasons, on shared server hosting ranked table view are no recommended for large table views, instead, it is recommended that a pre-calculated rank column be used rather that EasyTable Pro!'s dynamic rank calculation. To determine if you table is too large for your server, you can perform a simple calculation of Rows x Average Length of Each Row in Characters ÷ 1,048,5768 to calculate the M required by your server vs the memory available.

