Nolan
Nolan enables a very simple matrix style field within Pixel & Tonic's Matrix or native ExpressionEngine Grid fields - essentially a lightweight matrix within a matrix!
Installing / Usage
Install the Nolan Fieldtype and you'll see 'Nolan' as an available celltype when configuring Matrix or Grid. Two required configuration fields are Column Labels and Column Names.
'Column Labels' are what your publishers see, and 'Column Names' are what you reference in templates.
For example, I have Matrix or Grid field with a short name of 'teams', a Nolan cell with a short name of 'players', and I want it to contain first and last names of team players along with their position in the game.
In Column Labels, I'd enter: First Name | Last Name | Position
In Column Names, I'd enter: first_name | last_name | position
Templating
For Matrix
{teams} <!-- matrix field --> {players}<!-- nolan cell --> {first_name}, {last_name} - {position} {/players} {/teams}
For Grid
{teams} <!-- grid field --> {teams:players}<!-- nolan cell --> {first_name}, {last_name} - {position} {/teams:players} {/teams}
Additional variables available are:
{total_nolan_cols} - Number of columns in the Nolan cell {total_nolan_rows} - Number of rows in the Nolan cell {nolan_row_count} - Same as {count} to avoid variable clashes
Parameters:
limit="3" - limit the returned rows backspace="1" - remove end characters from the final output offset="1" - skip initial rows
Updating from Nolan 1.x
Due to a bug in the way EE fieldtypes get updated, it is extremely important you follow the instructions below carefully. You must follow these steps to keep your Nolan data in-tact when upgrading.
- Please backup your database
- Replace the old 1.x Nolan files and folders with Nolan v2
- With a SQL editor, browse the
exp_fieldtypes
table, and update the nolan row to have the value ofhas_global_settings
toy
. - In your EE control panel, visit Add-Ons -> Fieldtypes, and click on "Nolan".
- That's it, Nolan has been updated to 2.x
Caveats
Due to the simple storage method of Nolan, changing a Nolan cell's short name will not update existing values set, so choose your short names wisely.