1

Is it possible to make a Playa field show you additional options to help choose an entry from the Playa pane? I've got a situation where there's lots of entries on a site with the same titles (blog posts and user-submitted image galleries), so it makes it difficult to pick the correct entry. See the screenshot below:

enter image description here

Ideally, I'd like to be able to choose which columns are shown in the list alongside title, in a similar way to how you can choose the columns when viewing an Assets field in list mode. If that wasn't possible, then even being able to see the title and entry id in a title tag when hovering over the entry title would be better than nothing and save the trial and error of picking, saving, testing, and repeating, in order to get the correct entry.

I've looked in the various Playa settings and can't see any way to do this, so this may turn into a feature request. But I thought I'd post here first in case I was missing something, or if there was a config override that I wasn't aware of that might allow something like this (like magic ;-)), thanks.

  • That's a good question. I'd like to sneak in an additional question: is it possible to alter the height of the Playa field somehow? I'm not saying that I don't want to have scrollbars at all and I know that showing too many entries can result in performance drawbacks. I'm thinking about something like the double-default height to be able to see more entries at first glance. – Marc Sep 8 '13 at 14:26
3

I've hacked Playa before to do this same thing. Just modify /playa/views/entry.php

Using version 4.3.3, I added the entry_id for each entry like this in line 2 of entry.php.

Original:

   <a>
     <span class="playa-entry-status <?=str_replace(' ', '_',$entry->status)?>">&bull;</span>
     <?=$entry->title?></a>

Modified:

   <a>
     <span class="playa-entry-status <?=str_replace(' ', '_',$entry->status)?>">&bull;</span>
     <?=$entry->entry_id?> - <?=$entry->title?></a>

Just remember to reapply this if you update Playa in the future.

| improve this answer | |
  • Thanks for this, Stephen. Looks like a straight forward hack so something I'd be able to do, but I'll also tweet the post to Pixel and Tonic as a feature request. – Stephen Sep 10 '13 at 3:23

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.