2

We have Playa installed on our site and I wanted to use it to create a Related Articles box.

Here is the code I have in an embedded template:

<!-- Related Articles Box -->
{if related_articles!=""} <br>
    <div id="related-articles">
        <h4>Related Articles</h4>  
        <div class="col">    
        <div class="cat">For more information about this topic see the following articles:</div><br>
        {exp:channel:entries channel="whats_happening|learn_more"}
            <ul>
        {exp:playa:children  field="related_articles" field_id="52" }
            <li><h3><a href="{path=library/article/{url_title}">{title}</a></h3></li><br>
            {/exp:playa:children}
            </ul>
        {/exp:channel:entries}
        </div><!-- end .col --> 
</div><!-- end #related-articles -->

I know the parent template is calling this embedded one correctly because when I view Page Source I see my comments and but nothing in between gets displayed so it's gotta be a problem with this code right?

Thing is I had this working a few weeks ago and at some point it stopped working. I didn't notice until a coworker asked me what happened to it. The only thing I remember doing on the site was updating a couple of plugins so I rolled back to the previous versions but it still doesn't work now.

I can't think of what else to try. Can anyone help?

3

Looks like your missing dynamic="no" parameter on the exp:channel:entries tag. However, it seems like you might be over complicating things as the exp:playa:children would work by itself if you pass a embedded variable with the entry_id of the parent to the embedded playa:children tag:

{exp:playa:children entry_id="{embed:entry_id}"}
| 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.