Jump to content

Get Label from Repeater Matrix


joe_g
 Share

Recommended Posts

Not sure if this is documented anywhere, but you can use the RepeaterMatrixPage::matrix() to get the label:

// get the label in the current language
$page->my_repeater_matrix_field->first()->matrix('label');

In recent versions of RepeaterMatrix, you can also call RepeaterMatrixPage::getMatrixInfo() to get an array of information, including the label:

$page->my_repeater_matrix_field->first()->getMatrixInfo();

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...