I have a Matrix field as a Low-Variable. It contains two columns, each Playa-Fields.
First Playa-Field: All my sites Pages from my "Page"-Channel. Second Playa-Field: Every Sidebar-Block from my "Sidebar"-Channel.
I want to control all my Sidebars from one place with this structure. It allows me to create Sidebar-Groups through rows and even re-use Sidebar-Groups for two sites.
The problem: How can I check my {entry_id} (of the Page) against the {entry_id} of the first playa-field to check if I should execute this sidebar row?
I want something like below, but obviously it doesn't work. Who knows a work-around?
{exp:low_variables:parse var="lv_sidebar_pages" var_prefix="matrix"}
{if {matrix:cell_pages:child_ids} CONTAINS {embed:page_id}}
{matrix:cell_sidebars}
{!-- Sidebar-Code --}
{/matrix:cell_sidebars}
{/if}
{/exp:low_variables:parse}
I also thought about a possibility to check normally in the first Playa-Field and then skip aka. break this loop of the Matrix-Field:
{exp:low_variables:parse var="lv_sidebar_pages" var_prefix="matrix"}
{matrix:cell_pages}
{if {embed:page_id} != {entry_id}}
BREAK THIS MATRIX LOOP.. and jump to the next row..
{/if}
{matrix:cell_pages}
{matrix:cell_sidebars}
..so this code isn't executed
{/matrix:cell_sidebars}
{/exp:low_variables:parse}
Thanks for the help.