Playa is a powerful one-to-many field loosely based on Mark’s Multi-Relation extension.
Unlike the others, it enables you to…
Like Relationship and Multi-Relation fields, Playa uses the related_entries template tag:
{related_entries id="my_playa_field"}
<h4>{title}</h4>
{body}
{/related_entries}
For more information and the download, go to http://brandon-kelly.com/apps/playa/
Current version: 1.1.3
Most recent updates: - When saving an entry, Playa now leaves unchanged relationships in-tact - Fixed a caching issue by automatically clearing the relationship cache whenever a change is made
Oops!
Brandon I just tried the extension out and whilst I think it is working it does have a lot of errors popping up when I go to Publish an entry. I am getting :
Notice: Undefined variable: r in /usr/local/psa/home/vhosts/*******/httpdocs/*******/extensions/ext.playa.php on line 610 Warning: Missing argument 2 for get_rel_ids() in /usr/local/psa/home/vhosts/*******/httpdocs/*******/extensions/ext.playa.php on line 191 Notice: Undefined index: selected in /usr/local/psa/home/vhosts/*******/httpdocs/*******/extensions/ext.playa.php on line 763 The last error is repeated 14 times
Not sure if it is another extension messing with it though so will go and try turning them all off one by one and let you know what I come up with. Looks really neat so far though.
Best wishes,
Mark
Hi Brandon,
Just a really quick update on this one. I disabled all extensions except for Playa and still get the errors. Admittedly not so many of the last error but still around 4 of them.
Not really sure what it all means though. Would be great to have this one working without the errors though 😉 Seems like it would be a life-saver.
Best wishes,
Mark
Ya, I’m getting errors also. The custom field does appear on the Publish page and seems to do what it is supposed to, and looks like a really nice addition.
Here are the errors I’m getting at the top of the publish page:
Warning: Missing argument 2 for Playa::get_rel_ids(), called in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 681 and defined in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 191
Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763
Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763
Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763
Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763
Notice: Undefined index: selected in /home/*******/public_html/ee/*******/extensions/ext.playa.php on line 763
Edit: While I was typing this, Brandon posted an update and yes, the errors went away! Thanks!
Hi Brandon,
This looks really great.
Since this uses the {related_entries} template tag, I don’t suppose the backspace parameter (or something similar) is available in Playa? For example, if I wanted to output:
{related_entries id="my_playa_field"}
{title},
{/related_entries}
would there be a way to lose the comma after the last {title}?
Hi Brandon,
Seems to be working okay now but unless it’s just something weird on my system I think that maybe there is still something a bit awry and I think it is to do with the CSS file perhaps. There is a slight discrepancy in the control panel now.
Have taken a quick screen-shot (attached) of what is happening. Also happens on the other side of the control panel too. As long as it isn’t doing anything deeper to the system though then I can live with it but would be nice to get it back the way it should be 😉
Great extension though so thanks.
Best wishes,
Mark
Since this uses the {related_entries} template tag, I don’t suppose the backspace parameter (or something similar) is available in Playa? For example, if I wanted to output:would there be a way to lose the comma after the last {title}?{related_entries id="my_playa_field"} {title}, {/related_entries}
If you enable PHP parsing on output, you could:
<?php $re_count = 1; ?>
{related_entries id="my_related_entries"}<?php
if ($re_count > 1) echo ',';
$re_count++;
?> {title}{/related_entries}
It’s kindof hacky, but it would get the job done.
Have taken a quick screen-shot (attached) of what is happening. Also happens on the other side of the control panel too. As long as it isn’t doing anything deeper to the system though then I can live with it but would be nice to get it back the way it should be 😉
I’m getting that too… didn’t realize it was from Playa. I’ll look into it.
Oops I spoke too soon unfortunately.
On a rendered template I am getting the dreaded :
{REL[11][staff-picks]fREzvVHhREL}{REL[12][staff-picks]fREzvVHhREL}{REL[13][staff-picks]fREzvVHhREL}{REL[14][staff-picks]fREzvVHhREL}
kind of output.
Anything I should be doing that I’m not?
Best wishes,
Mark
Just wanting to let you know that I had the same problems as mentioned above. Grabbed the new version and both warnings and the css is now ok. Also foreign characters which the first version disrupted.
Great add-on! I’m usually a bit reluctant to use extensions since so few of them actually work. But this one does! (well, I haven’t tested it on the frontend yet…;)! Thank you!
Hi Brandon,
Simply this :
{exp:weblog:entries weblog="staff" limit="1" dynamic="on" disable="member_data|trackbacks|pagination|categories|category_fields"}
{related_entries id="staff-picks"}
<h4>{title}</h4>
{news-body}
<a href="#" title="{title}">{title}</a>
{/related_entries}
{/exp:weblog:entries}
Just this at the moment. I have a weblog setup called staff and a playa relationship field called staff-picks which allows staff members on their detailed page (which is what the code above is from) to show items from other weblogs.
All I keep on getting is the problems above though. I have tried clearing caches and everything but just get those weird numbers all the time which seem to change every time I refresh the template.
Just as a thought. Does this require a certain version of PHP to work correctly? I am on V4 ish but I seem to remember something about V5 working better for these kinds of extensions? Just a thought though.
Thanks for any help on this.
Best wishes,
Mark
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.