17

I'm using EE v2.7.0 and the syntax actually appears to be: {grid_fields} {grid_fields:relationship}{grid_fields:relationship:title}{/grid_fields:relationship} {/grid_fields}


17

The solution turns out to be fairly simple and the logic can pretty much work the same. EE relationship fields let you pull the count separately from the tag pair like this: {relationship-field:count} So, the solution is to use that in our conditional logic: {if "{relationship-field:count}" == ""} do stuff {if:else} do relationship stuff {/if}


10

Did you try this tag: {relationship_field:total_results} Example: {exp:channel:entries channel="xyz"} {relationship_field} {relationship_field:total_results} {/relationship_field} {/exp:channel:entries}


10

Long time to add to this but... {relationship-field} do relationship stuff {if relationship-field:no_results} Empty stuuf {/if} {/relationship-field}


7

Looks like you were missing the relationship tag pair for your person field. Try this: <Videos> {exp:channel:entries channel="videos"} {person} <Video> <Subject>{person:title}</Subject> <Facts> {person:facts} <Fact>{person:facts:fact}</Fact> {/person:facts} ...


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

The "limit entries by status" setting for the Relationship field controls what entries are available to select in the control panel - not what entries will display in your templates. So if you have the field set to "any status", and you've selected child entries with both "open" and "featured" statuses, then your tag will need an explicit status parameter: ...


6

I believe you need to have your categories tags set within the relationship tag pair like: {exp:channel:entries channel="parent"} <h1>{title}</h1> {relationship_field} <p>{relationship_field:categories backspace="2"}{category_name}, {/relationship_field:categories}</p> {/relationship_field} {/exp:channel:entries}


5

The documentation is confusing on the EL site. If you prefix the single tags variables count & total_results with the custom field name, you will have access to control your markup with conditionals. This should work: {cf_article_related} {if cf_article_related:count == 1} <aside> <h2>Further Reading</h2> &...


5

Have you tried labeling the statuses without the initial caps? I believe the default categories are open and closed not Open and Closed, is it possible that that is causing the issue for you? Additionally if you are trying to show all entries except a certain one consider using not. For example I have a status like status="not closed|open|...


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


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 ...


4

I’ve found the solution: {switch='odd|even'} needs to be namespaced so that it switches within the context of the relationship field, like so: {staff_member_groups:staff_group_members:switch='odd|even'} Otherwise, {switch='odd|even'} is going by the larger context of the entries tag that surrounds this template. For clarity, my final block of code looks ...


4

The short answer is that entries don't have URIs in EE. Content is completely separated from URL routing - it will appear wherever you decide to call it in your templates (which are essentially analogous to routing in EE). (The exception is when you set a Pages URI, or use an add-on like Structure which subverts this fundamental tenet of EE.) So, as Siebird ...


4

You need to prefix the categories loop with the related field name like this: {exp:channel:entries dynamic="no"} {parks}{parks:categories}{category_name}{/parks:categories}{/parks} {/exp:channel:entries} This is to allow you flexibility to display the parent entry's categories too, so it's quite handy.


4

Make sure that in the settings for your Relationship custom field that you have checked the box for "Include in selection Future entries?"


4

This works in my tests when accessing a child relationship: {relationship_field} <p>Child entry title: {relationship_field:title}</p> {relationship_field:grid_field} Column 1: {relationship_field:grid_field:grid_column_1} <br> Column 2: {relationship_field:grid_field:grid_column_2} <br> {!-- etc... ...


4

Try using the count and total results variables, but namespaced with the name of your relationship field: {relationship_field} {if relationship_field:count ==1} <ol> {/if} <li>{relationship_field:title}</li> {if relationship_field:count == relationship_field:total_results} </ol> {/if} {/...


3

That won't work as the relationship is a tag pair, so at it's basic you could use: {if "{related_articles}{related_articles:title}{/related_articles}"} <h3>Related Articles</h4> {related_articles} {related_articles:title} (etc...) {/related_articles} {if:else} There are no related articles. {/if} But that's really clunky....


3

Couple of things here. I don't think you need the Preparse option as Jeremy suggested, as you can filter by country/department ID, not by their actual names. Here's what to do: Results tag Use something like this in your Results tag: {exp:low_search:results channel="careers" query="{segment_3}"} code to display careers here {/exp:low_search:results} ...


3

I think the {parents} tag is what you're looking for. Where other articles are essentially "pointing" to this one, you should be able to do something like: <h2>Also available in:</h2> <ul> {parents field="original_article_relationship_field_name"} <li><a href="{parents:url_title}">{parents:language}</a></li> {/...


3

Use Stash - Here's how: {!-- ============================================ STORE A LIST OF RELATED ARTICLES INTO A LIST ================================================== --} {!-- first the manually chosen ones --} {exp:stash:set_list name="rels" parse_tags="yes" trim="yes"} {exp:channel:entries channel="article"} {related_articles} ...


3

You'll need the name of the relationship field on your parent entries. Instead of using static_parent_page == 0, try a namespaced no_results. {exp:channel:entries channel="static" sort="asc" offset="1" dynamic="off"} {static_parent_page} {if static_parent_page:no_results} <li> <a class="active" href="{url_title_path=static/...


3

If by "robust enough" you mean do they have basically the same features, yes. I've used EE's Relationships without any issues. I love Grid's search:column_name feature. That's a step up from Matrix. However, since it is brand new, it does not work with as many third party fieldtypes as Matrix. I'm sure that will change in the next 2-3 months. Depending on ...


3

In addition to Bhashkar Yadav's answer, this worked successfully for me: {exp:channel:entries channel='channel_xyz' status='not closed'} {if relationship_field:total_results > 0} ...do something! {/if} {/exp:channel:entries} ...that is, having it outside of the relationship field loop.


3

To output the information this worked for me: <p class="grid-row"><em>Fav Style:</em><span>{options:member_favourite_drinks}{if selected}{option_name},{/if}{/options:member_favourite_drinks}</span></p> ... and to have this in a select list: {custom_fields} {if field_name=="member_favourite_drinks"} <...


3

Try this... {parents field="specialty_pizzas"} {if parents:count == "1"}{parents:total_results}{/if} {/parents}


3

This example in the docs suggests that your code should be: {parents} {parents:channel_short_name} - <b>{parents:title}</b><br /> {/parents} Hopefully this helps.


3

As posted here -- http://www.blue-dreamer.co.uk/blog/entry/ee2.6-new-relationship-tags -- you can use these variations of {count}. Related Entries {custom_field} {if custom_field:count == "1"} <h2>Related</h3> <ul> {/if} <li>{custom_field:title}</li> {if custom_field:count == custom_field:total_results} </ul> {/if} {if ...


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