Pixel & Tonic

Matrix

version works on just rated
2.4 EE1 & EE2 $55
Buy Now Get Help

Converting LG Data Matrix Fields to Matrix

If you have any LG Data Matrix fields, you can easily convert them to Matrix fields from the Fieldtypes Manager. Just expand Matrix’s settings within your Fieldtypes Manager, and select which LG Data Matrix fields you wish to convert.

Warning: This is an irreversible operation. It is strongly advised that you backup your database first.

Updating Your Templates

Matrix will only convert the field settings and entry data. You’ll still need to update your templates manually.

In LG Data Matrix, you loop through each row like so:

{lgdm_field}
  {rows}
    <!-- row template markup -->
  {/rows}
{/lgdm_field}

In Matrix, the {rows} tag pair doesn’t exist:

{matrix_field}
  <!-- row template markup -->
{/matrix_field}

If you have any markup between your LG Data Matrix field’s primary tag pair, but not between its {rows} tag pair (which only get parsed if at least one row exists), you can reproduce that functionality using a conditional:

{if matrix_field}
  <h3>My Matrix field</h3>
  {matrix_field}
    <!-- row template markup -->
  {/matrix_field}
{/if}

Matrix does not support LG Data Matrix’s {headers}, {rows}, and {cells} tag pairs, or their nested single variable tags.