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

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


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

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


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

What version are you using? We fixed this problem in 2.9.3, though you can apply the solution if you'd rather not update. Open system/expressionengine/libraries/channel_entries_parser/Preparser.php and find the _find_modified_conditionals() method around line 374, and replace it with this: public function _find_modified_conditionals() { $prefix = $this-...


2

You may need to add the channel="" parameter to your channel:entries tag.


2

Have you considered the reverse? e.g. start at the brand channel and get the parents (e.g. products)? Might be more easy. Grid is quite new and the relationship field also was recently changed (2.6) search and categories are not mature i guess (Relationship field tag parameters). Have you also tried Grid search:column_name=? edit as noted in the comments ...


2

I wrote something nice about this the other day for someone. It can be done in EE without plugins and is pretty straight forward. I hope it helps. https://expressionengine.stackexchange.com/a/18229/1872


2

There is not a way to relate certain entries to another automatically with Playa. Actually you don't need to relate entries to a certain member, because EE already does that for you. When a member is logged in and creates a new entry, that entry is related to that member. Then with the author_id paramater in the channel:entries tag you could display all ...


2

Assuming that the alternate dates are related to the "parent" tour via a Playa field in each "alternate" entry (so the alternate dates are "children"), you'd simply do this: {exp:channel:entries channel="tours"} <h3>{title}</h3> <ul> <li><a href="{title_permalink="tours/view"}">{tour_date}</a></li> ...


2

This is easy using Low Search and its Relationships filter. You don't necessarily need a search form, as you can use the Results tag as a drop-in replacement for the channel:entries tag. Then you can use this parameter: {exp:low_search:results child:rel_field="1|2|3"} ...which will give you all entries that have entry ID 1, 2 or 3 assigned to them as a ...


2

Relationships changed in expressionengine 2.6. It looks like your template code won't work in 2.9.2. See the v2 docs on relationships: https://docs.expressionengine.com/v2/add-ons/channel/relationships.html For example if your relationship field is called "dashcam_relatie" you might have something like: {exp:channel:entries channel="dashcam"} {...


1

Let me see if I can help here. I'll discuss how I would approach this and hopefully we can go from there or I'll revise to clarify if needed. I would probably try to tackle this in one of the following ways - however I will state out front that I typically don't like to use relationship fields unless I have to, so I'll leave that bit of logic out for now. ...


1

I'm pretty sure that this example pulled right from the relationships docs will work for you: {exp:channel:entries channel="hotels"} {hotel_destination} {hotel_destination:siblings field="hotel_destination"} {hotel_destination:siblings:title} {/hotel_destination:siblings} {/hotel_destination} {/exp:channel:entries}


1

All you should need is this. Assuming "parents" is the name of the relationship field in the Clinic channel. ref https://docs.expressionengine.com/latest/fieldtypes/relationships.html#accessing-children {parents} <div class="show"> <strong>{parents:title}</strong> <div class="what">{parents:member_lastname}</div> <div class="...


1

Another approach you might want to consider is using the VMG Chosen Member add-on. Chosen Member gives you the ability to assign members to channel entries without having to turn those member details into entries in a parallel channel, and also provides some tools for hooking out member data fields into templates (so if a member is associated with a channel ...


1

You can use the match and against parameters to filter a list by the value of one or more columns. {!-- set the list --} {exp:stash:set_list name="groceries"} {stash:title}Cox Apple{/stash:title} {stash:color}green{/stash:color} {stash:title}Jazz Apple{/stash:title} {stash:color}yellow{/stash:color} {stash:title}Banana{/stash:title} {...


1

I am going to give you a solution that would work not knowing how your channel entries are set up if i had more information i know i could figure this out for you with playa, however this solution will work just fine. IF Tour titles and Dates are a one to many relationship meaning you are having for each Tour title 1 or more dates associated to it. You ...


1

Lets tidy this up: {exp:stash:set name="home_page_blocks" parse_tags="yes" trim="yes"}//Trim removes whitespace {exp:channel:entries channel="pages" backspace="1"} // Remove last '|' {select_left_blocks}{select_left_blocks:entry_id}|{/select_left_blocks} {/exp:channel:entries} {/exp:stash:set} This should now output a list like "33|23|35" - ...


1

What about just using the related_categories_mode="" parameter on the channel:entries tag?


1

I'm not sure I get what you finally want, but to show the second group of categories try using the show_group parameter to the categories tag (with the category group id): {related_products:categories show_group="2"}{category_url_title}{/related_products:categories}


1

Not sure I understand the question well but here is my take on it: Start with a url_title in your last segment Find the entry in channel E corresponding to that url_title Several entries in channel B are potentially related to that entry using the e_tag_b field. Following EE terminology, those entries are the "parents" of the entry in channel B Get the ...


1

It looks like you've forgotten to include your relationship field tag. Try this? {exp:channel:entries channel="B" } {e_tag_b} <h3>{e_tag_b:title}</h3> <p>{e_tag_b:b_url}</p> {/e_tag_b} {/exp:channel:entries}


1

You might be able to do this with a plugin (maybe Playa), but EE won't do this out of the box. Really, EE wants you to do relationships one-way. Either set up a bakery to select types of bread OR for each bread-type, say which bakery it's available at. Any particular reason it needs to be both ways? It might seem easier, but it ends up being confusing.


1

The category parameter was only added to the native Relationships tag pair in 2.7.3 (released yesterday). (See changelog.)


1

You should be able to get the count of the movie within the person_film_list relationship field by going one step further in your relationship drill down. When you get to the parent entry, add in a (child) relationship tag pair for the person_film_list field: {!-- a movie entry --} {exp:channel:entries channel="MOVIES" dynamic="no" entry_id="...


1

Turns out all products belongs to a tax category so it was thinking everything was related, had to disable that category from the output then all was fine!


1

Guessing by the style of relationship tags you are using the best way to do this is to use an embed. Steps: 1.) Create a template with the code for the destinations with an embed variable in the entry_id section. {exp:channel:entries channel="destinations" entry_id="{embed:eid}"} <h1>{title} Related to the Package Deal</h1> {/exp:channel:...


1

First off, your {images} tag is duplicated - instead of closing the first tag with {/images}, you have another {images}. Dunno if that's a simple typo from simplifying the actual template or not. Secondly, is the {if element_name=="intro_image"} code getting called at all? I've found that such conditionals never work for me. I have to wrap element_name in ...


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