Provides a lightweight relationship fieldtype for use with Pixel & Tonic Matrix .
Developed by Moresoda Design Ltd, http://moresoda.co.uk
- ExpressionEngine 2.1.3 +
- P&T Matrix 2.2+
- Firefox 2+
- Safari 2+
- Chrome 3+
- Opera 9+
- Internet Explorer 7+
- Copy the
system/expressionengine/third_party/morematrixrelations
folder to yoursystem/expressionengine/third_party/
folder. - Go to Add-ons→Fieldtypes in the ExpressionEngine control panel and install the fieldtype labelled moreMatrixRelations.
- You will now see moreMatrixRelations as a fieldtype option when creating & editing P&T Matrix fields
If you have setup a Matrix field called ‘people’ and within the Matrix settings you have created a moreMatrixRelations field called ‘name’, your templates may look like this. The fieldtype:
{exp:channel:entries channel="channel_name"} {people} <ul> {name} <li>{title}</li> {/name} </ul> {/people} {/exp:channel:entries}
The output could be something like the following:
<ul> <li>John Smith</li> <li>Richard Jones</li> <li>Sarah Richards</li> </ul> <ul> <li>James Parker</li> <li>Sarah Richards</li> </ul>
You can control the sort order using the ‘orderby’, ‘sort’ parameters and filter by entry status by using the ‘status’ parameter:
{exp:channel:entries channel="channel_name"} {people} <ul> {name orderby="entry_date" sort="desc" status="open"} <li>{title}</li> {/name} </ul> {/people} {/exp:channel:entries}
The status parameter can also accept custom channel status names.
Use the ‘prefix’ parameter to prefix all variable names, which helps prevent collisions with variables from the {exp:channel:entries} tag:
{exp:channel:entries channel="channel_name"} <h1>{title}</h1> {people} <ul> {name prefix="name"} <li>{name:title}</li> {/name} </ul> {/people} {/exp:channel:entries}
The field type must always be used as a tag pair. The following top level channel entry variables are available inside the moreMatrixRelations tag pair:
- entry_id
- title
- url_title
- site_id
- channel_id
- author_id
- status
- page_uri
Channel custom fields are not available.
Example:
{exp:channel:entries channel="channel_name"} {people} <ul> {name orderby="entry_date"} <li>{title}</li> {/name} </ul> {/people} {/exp:channel:entries}
This parameter will allow you to customise the display order of the selected entries. The default sort order will be ascending. Valid field names are the same as the variables made available in the template tags:
- entry_id
- title
- url_title
- site_id
- channel_id
- author_id
- status
- page_uri
Example:
{exp:channel:entries channel="channel_name"} {people} <ul> {name orderby="entry_date" sort="asc"} <li>{title}</li> {/name} </ul> {/people} {/exp:channel:entries}
This parameter can only be used in conjunction with the ‘orderby’ parameter. Valid sort options are:
- asc
- desc
- random
Example:
{exp:channel:entries channel="channel_name"} {people} <ul> {name status="closed"} <li>{title}</li> {/name} </ul> {/people} {/exp:channel:entries}
Allows filtering of the selected entries by status. Default status fields are ‘open’ / ‘closed’ but custom status fields can also be used.
If the status parameter is not specified it will filter out ‘closed’ entries by default.
- Fixed bug encountered when the publish form is submitted with required fields missing
- Fixed bug where page_uri tag was not working
- Ordering and sort parameters added to template tags
- Status filter parameter added to template tags
- Ability to select multiple entries from within the matrix field.
- Configuration option to restrict selection to a single entry or allow the multi select.
- Template tag updated to use tag pairs only.
- Ability to select entries from multiple channels. Entries are listed organised by channel when using the fieldtype in a Matrix field.
- Added page_uri to list of fields available in templates
- Renamed the add-on moreMatrixRelations
- Updated docs
- Public release