Any answer to this Brandon?
Is there a way of checking against the weblog (and therefore the field group) that an entry has been selected from when assigning 2 weblogs and only limiting the number of related entries to 1?
Basically I want to use Playa to allow the user to select one item only from a total of 2 weblogs (not one entry from each).
I wanted to know of there was a conditional I can use that says if the related entry is from weblog 1 then do this but if from weblog 2 do that.
At the moment I have 2 Playa fields but using the above would guarantee that only one choice can be made.
Cheers and I look forward to a response.
I wanted to know of there was a conditional I can use that says if the related entry is from weblog 1 then do this but if from weblog 2 do that.
Sorry, was a bit confused by your previous post. I think I’m following you now.
In the CP, set the Playa field’s Maximum Selections to 1. Then in the templates do something like this:
{related_entries id="my_playa_field"}
{if weblog == "My Weblog 1"}
{!-- whatever --}
{if:elseif weblog == "My Weblog 2"}
{!-- whatever else --}
{/if}
{/related_entries}
That help?
Didn’t work for me. Here is the initial template -
{exp:weblog:entries weblog="homepage" entry_id="62" disable="categories|member_data|pagination|trackbacks"}
{related_entries id="homepage_choice"}
{if weblog == "exhibitions"}
{embed="includes/homepage_exhibition" exhibition_item="{entry_id}"}
{if:elseif weblog == "gallery"}
{embed="includes/homepage_gallery" gallery_item="{entry_id}"}
{/if}
{/related_entries}
{/exp:weblog:entries}
I’m getting the REL bug for all my related_entries where EE outputs garbled code instead of content, for example:
{REL[4137][tour_of_the_month]d25KUx7WREL}
This happens whether the field is a standard relationship field or Playa field.. Kind of frightening considering my project is heavily dependent on relating products to other products..
Does anybody have any idea where or why this bug originates? I’m on PHP 5.2.0 with 16 megs of memory running EE 1.6.4.
The extensions I have enabled are as follows:
File, by Mark Huot (v.3.1.1) Geo Coordinates (v.1.0.5) Tiny MCE Extension for EE (v.1.0.0) Playa (v.1.0.9)
Please help!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.