Skip to content

Latest commit

 

History

History
117 lines (80 loc) · 2.2 KB

README.textile

File metadata and controls

117 lines (80 loc) · 2.2 KB

moresoda

moreMatrixRelations

Provides a lightweight relationship fieldtype for use with Pixel & Tonic Matrix .

Info

Developed by Moresoda Design Ltd, http://moresoda.co.uk

Requirements

  • ExpressionEngine 2.1.3 +
  • P&T Matrix 2.2+

Browser Compatibility

  • Firefox 2+
  • Safari 2+
  • Chrome 3+
  • Opera 9+
  • Internet Explorer 7+

Installation

  1. Copy the system/expressionengine/third_party/morematrixrelations folder to your system/expressionengine/third_party/ folder.
  2. Go to Add-ons→Fieldtypes in the ExpressionEngine control panel and install the fieldtype labelled moreMatrixRelations.
  3. You will now see moreMatrixRelations as a fieldtype option when creating & editing P&T Matrix fields

Example Usage

Simple Example

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:

	{exp:channel:entries channel="channel_name"}
		<ul>
		{people}
			<li>{name}</li>
		{/people}
		</ul>
	{/exp:channel:entries}

By default the field returns the entry title:

	<ul>
		<li>John Smith</li>
		<li>Richard Jones</li>
		<li>Sarah Richards</li>
	</ul>

Parameter Example

You can access different information regarding the related entry by using the ‘field’ parameter:

	{exp:channel:entries channel="channel_name"}
		<ul>
		{people}
			<li>{name field="url_title"}</li>
		{/people}
		</ul>
	{/exp:channel:entries}

Produces:

	<ul>
		<li>john-smith</li>
		<li>richard-jones</li>
		<li>sarah-richards</li>
	</ul>

Parameters

field

Example:

	{field_name field="entry_id"}

Allows you to display different information about the related entry. Accepts the following field names:

  • entry_id
  • title – [default]
  • url_title
  • site_id
  • channel_id
  • author_id
  • status
  • page_uri

Change log

1.2

  • Added page_uri to list of fields available in templates

1.1

  • Renamed the add-on moreMatrixRelations
  • Updated docs

1.0

  • Public release