3

I'm stuck on something that will probably be very easy to resolve but I just don't see it anymore.

I'm using low variable to create the content of a carousel slider. For each slider the information is added in a matrix row. At the end of each row I created a playa field which fetches data from two channels to retrieve their title.

The carousel works very well and the different row's are added to the carousel and I can also retrieve the title from the playa field.

Now the issue I have is that per matrix row iteration playa loops through the total row's which results in that I get all the titles on every slide of the carousel. I would like to only get the title of the playa field defined in the matrix row of my current iteration.

It's probably a scripting error or I'm not using the tags how they should be used, so if somebody could have a peak that would be great.

Here below you'll find some screenshots.

thx, Claudio

<div id="sliderBlock">
    <div class="flexslider">
    <ul class="slides">
    {exp:low_variables:pair var="lv_hp_car"}
        <li><!--<a href="http://www.google.com">-->
                {exp:ce_img:single src="{hp_car_item_img}" width="781" height="443" alt="{hp_car_item_title}" crop="yes"}
            <!--</a>...-->

            {if hp_car_item_title != ""}
            <div class="flex-caption">
                {exp:playa:children var="playa_test" var_prefix="hpcar" }<h2>{hpcar:title}</h2>{/exp:playa:children}
                {if hp_car_item_type == "Exhibition"}<p class="date">{hp_car_item_start_date}  -  {hp_car_item_end_date}</p>{/if}
                <p class="description">{hp_car_item_intro}</p>
                <p class="author">{hp_car_item_credits}</p>
                <p class="imgHeader"><img src="image/backgroundTransparant.png" /></p>
            </div>
            {/if}
        </li>
    {/exp:low_variables:pair}
    </ul>

    <div id="clearFloat"></div>
</div>
</div>

enter image description here enter image description here

  • 1
    I found a solution but I will post it tomorrow because apparently I cannot answer my own question within 8 hours of posting it because my reputation score is below 10. – claudio_101 Dec 18 '13 at 20:30
1

ok now I found it! :D

{exp:low_variables:pair var="my_matrix"}
    {exp:playa:children var="pl"}

        {if {my_matrix:row_count} == {pl:count}}

             <h2>{pl:title}</h2>

        {/if}

    {/exp:playa:children}
{/exp:low_variables:pair}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.