Hey all,
As commonly noted, the original Playa thread is getting ridiculous, so I figured I’d start a new thread to announce that…
Playa 1.2 has been released!
What’s new in this update:
If you missed the 1.1 update, take a look at the Change Log to see what else is new with the extension.
Enjoy!
I consider this one of the most important Extensions for EE. My current build (as well as my previous one, and the one before that…) have relied on Playa for advanced functionality. I love it. Clients love it.
Thank you for your work on this.
Edit/Add: I don’t think you need to include LG Addon Updater in the download. If Leevi is cool with it…that’s fine, but because this extension works without the updater, the Playa user should just go get that themselves. What if Leevi updates, and you’re bundling an older version?
Thanks, Ryan!
I don’t think you need to include LG Addon Updater in the download. If Leevi is cool with it…that’s fine, but because this extension works without the updater, the Playa user should just go get that themselves. What if Leevi updates, and you’re bundling an older version?
Interesting point. I’ve always thought of LGAU as a bundled update framework (like Sparkle) rather than a standalone extension. And I fear that most people won’t go through the trouble of downloading/installing it if it’s not conveniently bundled. I plan on keeping the zip up to date with the latest version, but in the event that someone downloads Playa when it’s not up to date, they’ll just get their first update notification a little sooner than most.
Of course if Leevi doesn’t like the idea, that’s another story. I’ll ask…
I consider this one of the most important Extensions for EE. My current build (as well as my previous one, and the one before that…) have relied on Playa for advanced functionality. I love it. Clients love it.
I totally agree! Great work on Playa, it’s saved my butt many times.
Edit/Add: I don’t think you need to include LG Addon Updater in the download. If Leevi is cool with it…that’s fine, but because this extension works without the updater, the Playa user should just go get that themselves. What if Leevi updates, and you’re bundling an older version?
Again I agree. Actually I think it will be ok if you include it. LG Addon Updater updates itself as well so if I release a new version the user will be notified. The only thing I ask is that you don’t distribute a modified version of the extension. All kinds of things could go wrong then.
The only thing I ask is that you don’t distribute a modified version of the extension. All kinds of things could go wrong then.
Yeah, not modifying it in any way; just trying to make it convenient for people to install. I think it would be great if LGAU were bundled with EE, like CP jQuery.
Just released Playa 1.2.1.
Playa will now remember its settings after disabling and re-enabling the extension.
Brandon– do you take payments/donations for Playa and Snitch? I can’t find a link on your page. Maybe it’s time to setup a tip jar?
You know, I had thought about adding a Donations button to the settings form for 1.2, but totally forgot about it. Thanks for the reminder! 😊
Just added one to the current 1.2.1 release.
Thanks for your support!!
Just installed 1.2.1– getting this error:
I should probably have enabled display_errors on my dev site, huh?
That’s been fixed now in Playa 1.2.2.
Thanks for the update.
I have been struggling with a way to show / hide a simple heading based on whether a certain type of relationship exists within the weblog entry being shown.
<div id="documents">
<h3> Related Downloads </h3>
{exp:weblog:entries weblog="pages" limit="1"}
{related_entries id="rel_media"}
{if media_type == "Document" }
<a href="http://{media}" class="{media_class}"> {title} </a>
{/if}
{/related_entries}
{/exp:weblog:entries}
</div>
If there are no related items that are Documents then I’d like the whole block not to show anything. I’ve tried setting conditions with PHP but nothing seems to work when the first related item isn’t a Document.
If there are no related items that are Documents then I’d like the whole block not to show anything. I’ve tried setting conditions with PHP but nothing seems to work when the first related item isn’t a Document.
You could try something like this:
<?php
$document_count = 0;
$output = '';
?>
{related_entries id="rel_media"}
{if media_type == "Document" }
<?php
$document_count++;
?>
{/if}
<?php
$output .= '<a href="http://{media}" class="{media_class}">{title}</a>';
?>
{/related_entries}
<?php
if ($document_count > 0) echo $output;
?>
You could try something like this:
Thanks for the reply, that was pretty much the basis of my php attempt too. The problem appears to be the that the count is incremented even if media_type is something other than “Document”, in my case its “Image”. I assume that this has to do with EE and its parsing.
{if media_type == "Document" }
<?php
$document_count++;
?>
{/if}
In fact combining the two blocks still results in items appearing in $output even though they are within an EE IF clause. ( this has me stumped )
{related_entries id="rel_media"}
{if media_type == "Document" }
<?php
$document_count++;
$output .= '<a href="http://{media}" class="{media_class}">{title}</a>'; <!-- media_type = "Image" appear here ?? -->
?>
{/if}
{/related_entries}
Anyway probably off topic as its not a problem with Playa, but rather a EE / PHP parsing debacle.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.