1

I'm trying to get the current "row_id" of a Playa entry, but it doesn't seem to want to output.

I'm prefixing it because there was another plugin that was conflicting with the {count} and {total_results} variables.

So my code looks like this:

{cf_course_content var_prefix="q" limit="1" offset="{course_progress_id}"}
     {q:count}
     {q:total_results}
     {q:row_id}
     {q:cf_question_type}
{/cf_course_content}

But when this is rendered, it looks like this:

1
15
{row_id}
Drag & Drop

Why would it output like that? When all the other prefixed variables are working. I've pulled this outside of any other plugins / modules just incase anything was clashing and it still does this.

I've also been doing a bit of digging, and i'm not sure if "row_id" is what I need to output anyway.

I'm trying to get the "Row Position" inside the Playa field. But I believe the "row_id" is a unique reference from the DB? Not Unique to that particular entry.

Is there any way to output this, or get around the "row_id" problem?

1
  • Aren't you looking simply for {count} ? Apr 25 '13 at 10:19
0

{row_id} is a Matrix tag. Playa doesn’t know anything about it. To get the current entry’s position within the Playa field, just use {count} (or {q:count} since you’ve got that var_prefix param.

2
  • 1
    Will the {q:count} not just output "1" though, if i'm limiting it to only 1 Playa entry? Ideally I want to be able to get the ID of the position it is in, in Playa.
    – Jason Mayo
    Apr 25 '13 at 13:23
  • Sorry, there’s no tag to get a single entry’s position within the Playa field, if you’re taking it out of context :-/ Apr 26 '13 at 11:22

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.