Created
February 2, 2014 16:37
-
-
Save brandonkelly/8771071 to your computer and use it in GitHub Desktop.
Grabbing “parent” Matrix rows, where the Matrix field has a Playa cell that is relating to a given entry.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{exp:channel:entries ... } | |
{exp:playa:parents field="matrix_field_name" col="playa_col_name" var_prefix="parent"} | |
{parent:matrix_field search:matrix_col_name="[{entry_id}]" var_prefix="row"} | |
{row:some_col_name} | |
{!-- we can even loop through all of those related entries | |
(which will include the top-level entry) if we want... --} | |
<ul> | |
{row:playa_col_name var_prefix="row_entry"} | |
<li>{row_entry:title}</li> | |
{/row:playa_col_name} | |
</ul> | |
{/parent:matrix_field} | |
{/exp:playa:parents} | |
{/exp:channel:entries} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment