Hot answers tagged

21

The guys at P&T did come back to me in less than 24 hours with a fix. I'll post it here in case someone runs into the same problem. Take a look at the columns in exp_playa_relationships table in the database. Does it have a field parent_var_id? If no, then the version you should set is 4.1. If yes, does it have a field parent_is_draft? If ...


12

For some reason sometime the update is applied but EE does not change the version number. I'm not even sure on which side the error happens, but setting the version number to 4.5 in exp_fieldtypes should solve your problem.


11

Using the new var_prefix (came in in version 4.2 IICRC) embeds have / can been done away with. Links to docs - http://pixelandtonic.com/playa/docs/templates Example code: {exp:playa:children channel="news" parse="inward" var_prefix="news"} {news:exp:playa:children channel="editors" var_prefix="editor"} {news:title} - {editor:title} {/news:...


9

If you're going the category route, you could use the native Dynamic Parameters, possibly with Dynamo, to filter entries. However, using Low Search (or Super Search), you can also filter by Relationship fields (including Playa fields), so that would be more flexible. For example, you can use inclusive filters, allowing to mimic category="1&2&3" as ...


9

Looks like the update for Playa didn't complete. The "rel.parent_is_draft" column isn't in the database. Make sure you followed all the Playa update instructions including this one: Go to Add-Ons → Fieldtypes → Playa to trigger Playa’s update script.


7

...And as soon as I write it down in a question, I figured out my mistake. Correct solution for future visitors was: {if "{product_videos:total_children}" > 0} //do something {/if}


6

I've worked it out in a moment of clarity and by re-reading the excellent Playa documentation. The tag pair I wanted was {exp:playa:parents channel="products"} So on my chemistry page I'd have something like {exp:playa:parents channel="products"} <a href="/products/{url_title}}">{title}</a> {/exp:playa:parents} This shows me any entries ...


6

You can do this: {exp:playa:parents channel="News"} {if count == 1} <h4>Related News</h4> <ul> {/if} <li><a href="{page_url}">{title}</a></li> {if count == total_results} </ul> {/if} {/exp:playa:parents}


6

My decision to use playa over Ellis' new relationships, is based on: 1) When you buy an addon from a top-notch developer like Brandon Kelly, it comes with developer support, which can include timely addition of future features that you request v. paying for a support plan from Ellis if you don't have one already. 2} Playa has been vetted for many years ...


6

I don't know if you already have a anwser yet. But I had the same problem and I. I want to enable pagination within a Playa loop. You need to do 2 things to enable pagination in a Playa loop. Override the default disable of “categories|category_fields|member_data|pagination”. Put var_prefix in your Playa tag and pagination tag. You did a good override of ...


5

In theory {count} should work. If it’s always being output as ‘1’ that means that {exp:channel:entries} (or another module tag pair you’re not telling us about?) must be parsing the tag before Playa had a chance to claim it. Try adding your own custom var_prefix to your Playa tag pair, and apply that var_prefix to the {count} variable tag, as well as any ...


5

If you do not specify orderby and sort parameters on the playa tags, the order in which they are displayed is the one in which they are displayed in the drop panes interface in the CP. Code {exp:channel:entries channel="mainchannel" limit="1"} ... entry stuff ... {exp:playa:children channel="relatedchannel" status="open"} {!-- Capture ...


5

You can, you just need to hold Playa’s hand a little so it knows which entries all of those tags belong to. You do that with Playa’s var_prefix param: {exp:playa:parents ... var_prefix="consultation"} Physician: {consultation:cf_consult_doctor var_prefix="doctor"} {doctor:title} {/consultation:cf_consult_doctor} {/exp:playa:parents}


5

It’s actually just sheer luck that that worked for you in EE1 – there are a lot of variables at play with EE’s parse order, and most of the time that kind of thing won’t work. You can get it working using Matrix and Playa’s var_prefix parameters, though: {exp:channel:entries} {matrix} {playa var_prefix="playafield"} {playafield:...


5

That’s an error in the documentation, and we’ll get that fixed. :child_ids only supports filtering entries with the following parameters: var_id var element_id field_id field col_id col row_id child_id parent_id If you need anything else, and you should just use a tag pair: {event_related_media limit="2" status="Archived" channel="video" ...


5

It's a pretty simple operation, since they are stored very similarly. First, backup your database. Then, run this code in a PHP-enabled template: <?php $playa = ee()->db->query("SELECT * FROM exp_playa_relationships"); foreach($playa->result_array() as $rel) { $data = array( 'parent_id' => $rel['parent_entry_id'], '...


5

Always read the manual Steven!!! http://docs.pixelandtonic.com/playa/using/converting/relationships.html


5

So far I've discovered and fixed one case and will add more here if discovered. File: mod.playa.php Line: 550 FROM $sql = 'SELECT DISTINCT(rel.child_entry_id) AS entry_id TO $sql = 'SELECT DISTINCT rel.child_entry_id AS entry_id, rel.parent_entry_id, rel.parent_field_id, rel.parent_row_id, rel.parent_col_id, rel.parent_var_id, rel.rel_order


4

Playa from Pixel & Tonic has sibling relationships that might work the way you want them to.


4

You could use MX Select Plus to accomplish this. Then in the settings for that custom field use the DB request and run a query like below. Make sure to define the upload_location_id. You may need to modify the query to your needs: SELECT file_id AS option_name, file_name AS option_label FROM exp_files WHERE upload_location_id = X ORDER BY file_name ASC


4

Here are some ideas: Add the field="" or field_id="" parameters. Do the children entries have a custom status set? If yes, you'll need to specify it with status="" parameter. Check the entry dates for the child entries. Is the entry date in the future? Is an expiration date set that is causing the entries not to show? Try removing the channel="" parameter ...


4

If you want to output the entries that you selected in the LV-Playa field, use the Parse (or its alias: Pair) tag. You can then use any of the parameters can use with a playa:children tag. So, for example: {exp:low_variables:pair var="lv_settings_home_feature_items" limit="3"} ...more code here... {/exp:low_variables:pair} To get to the other related ...


4

Playa and Matrix both use the channel_entries_tagdata extension hook to do their thing. Extension hooks are called whenever that particular hook runs in EE's process, regardless of whether they may be needed anywhere on that individual page load. In this case, I can only assume you're returning 60-70 individual channel entries in your template? But they are ...


4

If it’s just the search/filters that aren’t working, Playa uses Ajax to apply those things, which goes through your Site URL, not your themes folder. If you don’t want to set your main site URL to use SSL, you can give Playa an alternate URL to use by opening up system/expressionengine/config/config.php and adding this: $config['playa_site_index'] = "https:...


4

Have you tried using total_results instead of count? {exp:playa:children} {if total_results == "1"} <ul class="agent"> <li class="name">{title}</li> <li class="phone">{phone}</li> <li class="mail">{agent_email}</li> </ul> {if:else} <div ...


4

Sean, you may need to add a status parameter to your playa tag like so: {exp:playa:parents channel="zoo_visitor" status="not closed"}. Zoo Visitor uses a custom status per member group and the playa tag will only pull in those with an Open status by default.


4

NotoriousWebmaster - Playa disables categories by default. You'll need to add disable= to over-ride the parameter. {exp:playa:children field="also_like" status="open|wide" disable="members"} or similar. Let me know if that helps!


4

I fixed this issue. It was/is a bug in Playa. Pixel and Tonic now knows about it and will include a fix in the next release. In the meantime, here is my solution: Change Line 2484 of ft.playa.php to... $data = array( 'parent_var_id' => $this->var_id, 'parent_is_draft' => 0 ); Basically added 'parent_is_draft' => 0


4

There is a bit of a bug in Playa that impacts Low Variables: exp_playa_relationships has parent_var_id field. It's supposed to be either 0 or 1. Low Variables sets it to NULL due to an oversight in our code. The solution was to set the column to 0 for rows, that were not 1. We'll have a fix for this included in Playa in the future, but for right now, ...


4

Do you mean that a single entry could have a single entry relating itself to over 2,000 other entries, or just that there are 2,000+ other entries to choose from? If the latter, the answer is Yes, Playa is quite capable of dealing with large numbers of entries. Simply set a Limit on the Playa field to something like 100 entries, and then use the Search bar ...


Only top voted, non community-wiki answers of a minimum length are eligible