Matrix Celltype

One of the most powerful gems in Playa is its celltype for Matrix. This can be useful if you wish to store extra information on a relationship.

For example, pretend you have a People channel and a Bands channel, and you want to create a relationship between the two called “Favorite Bands”. Generally, a normal Playa field would excel here.

But let’s say you also want to store an explanation as to why each band is a favorite. The easiest way to go about this would be to create an Matrix field, and give it a Playa Select column and a Text column, labeled “Band” and “Why?”, respectively.

Here’s how the template might look for this field:

<ol>
  {favorite_bands}
    <li>
      <h5>{band}{title}{/band}</h5>
      <p>{why}</p>
    </li>
  {/favorite_bands}
</ol>