0

I'm getting this message in EE 2.8.1 dev logs with Playa 4.4.5:

A template loaded on http://dev.tear.org.au/projects/ is using the deprecated {parent:url_title} tag. Please use Playa’s var_prefix parameter instead.

This answer helped, but not enough.

I've seen the var_prefix docs concerning the module tags, but can't find info regarding the fieldtype tag, which is what I am using.

My code looks like this (simplified):

{exp:channel:entries...}
    {project_content} <-- PLAYA FIELD
    {content limit="1"}
        <h4>
            <a href="/projects/{parent:url_title}">{parent:title}</a>
        </h4>
    {/content}
    {/project_content}
{/exp:channel:entries}

How would I need to modify my template to use the new parameter?

Thank you

1 Answer 1

1

You shouldn't need to prefix with Playa for what you're doing. You should just be able to use...

{exp:channel:entries...}
    {project_content}
        {content limit="1"}
            <h4><a href="/projects/{url_title}">{title}</a></h4>
        {/content}
    {/project_content}
{/exp:channel:entries}

The var_prefix parameter comes in handy when you want to do things like pagination for your Playa entries. You need to prefix it then so that it doesn't interfere with the main entry's pagination. But in your example, it shouldn't be required.

3
  • Hmmm... so why am I getting that warning in the dev log? Jun 10, 2014 at 11:25
  • Are you still getting that in the log after updating the code to that in my answer? It does have a very slight difference from the one in your question.
    – Mutual
    Jun 10, 2014 at 13:56
  • Ah - missed that, sorry, and yes, it works without the prefix - thanks! Jun 11, 2014 at 2:13

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.