FF Matrix
FieldFrame Documentation
- FieldFrame Documentation
- Getting started
Bundled fieldtypes
Fieldtype development
- Changelog
FieldFrame 0.9.5 comes bundled with a new fieldtype, FF Matrix. It mimics the LG Data Matrix extension, but with one major added bonus: It supports custom celltypes.
LG Data Matrix only supported a limited number of celltypes, which were built directly into the extension. FF Matrix, on the other hand, will base its celltypes on all FieldFrame fieldtypes which have a display_cell function. You can read more about celltype development in the Functions reference.
Configuration

In the Edit Field form, when you choose “FF Matrix” in the Field Type select, a “Matrix Configuration” table will appear in the row below. This is where you define which columns your FF Matrix field should have, and which cell types each column should use. If the cell type has its own settings, you will fill those in here as well.
Templates
Tag parameters
The following parameters can be added to each of FF Matrix’s tags:
search:speaker_confirmed="yes" (new)
Only loop through rows that match a certain criteria. Mimics the parameter for {exp:weblog:entries}, and supports comparison operators <, >, <=, and >= as well.
orderby="session_time|session_track"
Order the rows by their column values.
sort="asc|desc"
Sort the rows in ascending or descending order
sort="random"
Sort the rows randomly
offset="5"
Skip the first X rows
limit="5"
Limit the number of rows to be returned
backspace="2"
Strip the last X characters from the tag output
Primary tag pair
Calling your FF Matrix field with a tag pair allows you to fully customize the output:
{speakers}
<h2>{speaker_name}</h2>
<img src="{speaker_photo}" width="50" height="50" alt="{speaker_name}"/>
<p>{speaker_description}</p>
{/speakers}
Single variable tags
The following single variables are available within your tag pair:
{row_count}
The current row’s count
{total_rows}
The total number of rows
{switch="odd|even"}
Switch between multiple values based on the current row index
:table tag
Returns a full HTML table.
{speakers:table cellspacing="0" cellpadding="0"}
Additional :table tag parameters
In addition to the other FF Matrix tag parameters, you can also use these with :table:
cellspacing="5"
The table’s cellspacing attribute (default is 1)
cellpadding="5"
The table’s cellpadding attribute (default is 10)
:total_rows tag
Returns the total number of rows within your FF Matrix field.
We have a fantastic lineup of {speakers:total_rows} speakers lined up!