0

I've found a couple other posts regarding same issue, but can't seem to resolve with any solutions out there.

Everything is outputting fine except content in tag pair {studies_outline_block}, which is a matrix field inside a playa field inside of a matrix field.

Any help is much appreciated.

<?php $i = 1; ?>     

{exp:channel:entries channel="pages"}
    {studies_projects}
        <div class="col-sm-6 col-md-4 col-lg-3 col-xs-12">
            <div class="project-box ">
                <img src="{image}" alt="{cat_name} category image">
                <h3>{cat_name}</h3>
            </div>
            <ul>
                {playa_projects}
                    <?php $count = $i++; ?>
                    <li><a class="fancybox" href="#inline-<?php echo $count; ?>" title="{studies_caption}">{title}</a></li>
                    <div id="inline-<?php echo $count; ?>" style="display:none;">
                        <div id="slider<?php echo $count; ?>" class="flexslider slider-js">
                            <div class="flex-heading">
                                <div class="col-md-6">
                                    <h2>{project_name}</h2>
                                </div>
                                {studies_outline_block}
                                        <div class="col-md-2 project-name">
                                            <h3>Project Size</h3>
                                            {content_1}
                                        </div>

                                        <div class="col-md-2 project-name">
                                            <h3>Project Cost</h3>
                                            {content_2}
                                        </div>
                                        <div class="col-md-2 project-name">
                                            <h3>Project Use</h3>
                                            {content_3}
                                        </div>
                                {/studies_outline_block}
                            </div>
                            <ul class="slides">
                                {studies_image_gallery}
                                    <li><img src="{url}" /></li>
                                {/studies_image_gallery}
                            </ul>
                        </div>
                        <div id="carousel<?php echo $count; ?>" class="flexslider carousel-js">
                            <ul class="slides">
                                {studies_image_gallery}
                                    <li><img src="{url}" /></li>
                                {/studies_image_gallery}
                            </ul>
                        </div>
                    </div>
                {/playa_projects}
            </ul>
        </div>
    {/studies_projects}
{/exp:channel:entries}
1
  • Have you tried using the var_prefix parameter? Jan 19 '16 at 10:59
0

Was able to resolve using the var_prefix parameter. Here's the correct code:

<?php $i = 1; ?>     

{exp:channel:entries channel="pages" dynamic="off"}
    {studies_projects}
        <div class="col-sm-6 col-md-4 col-lg-3 col-xs-12">
            <div class="project-box ">
                <img src="{image}" alt="{cat_name} category image">
                <h3>{cat_name}</h3>
            </div>
            <ul>
                {playa_projects var_prefix="playafield"}
                    <?php $count = $i++; ?>
                    <li><a class="fancybox" href="#inline-<?php echo $count; ?>" title="{studies_caption}">{playafield:title}</a></li>
                    <div id="inline-<?php echo $count; ?>" style="display: none;">
                        <div id="slider<?php echo $count; ?>" class="flexslider slider-js">
                            <div class="flex-heading">
                                <div class="col-md-6">
                                    <h2>{playafield:project_name}</h2>
                                </div>
                                {playafield:studies_outline_block var_prefix="nested_matrix"}
                                    {if nested_matrix:content_1}
                                        <div class="col-md-2 project-name">
                                            <h3>Project Size</h3>
                                            {nested_matrix:content_1}
                                        </div>
                                    {/if}
                                    {if nested_matrix:content_2}
                                        <div class="col-md-2 project-name">
                                            <h3>Project Cost</h3>
                                            {nested_matrix:content_2}
                                        </div>
                                    {/if}
                                    {if nested_matrix:content_3}
                                        <div class="col-md-2 project-name">
                                            <h3>Project Use</h3>
                                            {nested_matrix:content_3}
                                        </div>
                                    {/if}
                                {/playafield:studies_outline_block}
                            </div>
                            <ul class="slides">
                                {studies_image_gallery}
                                    <li><img src="{playafield:url}" /></li>
                                {/studies_image_gallery}
                            </ul>
                        </div>
                        <div id="carousel<?php echo $count; ?>" class="flexslider carousel-js">
                            <ul class="slides">
                                {studies_image_gallery}
                                    <li><img src="{playafield:url}" /></li>
                                {/studies_image_gallery}
                            </ul>
                        </div>
                    </div>
                {/playa_projects}
            </ul>
        </div>
    {/studies_projects}
{/exp:channel:entries}

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.