We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

[solve] Search results : Displaying relationship field

How Do I?

tdulac's avatar
tdulac
2 posts
8 years ago
tdulac's avatar tdulac

Hello, I realy hope you could help me. I use EE3.3.0. I want to display results return by Simple Search. Many entries has relationship field. On one hand I read on doc:

Nearly all of the Channel Entries Tag Variables are available for the search results page …

..not details about the “nearly”… on the other the Relationship fields don’t parse.

{exp:search:search_results}
        {if channel_short_name=="illustrations"}
           {url_title_path="explorer/illustration"}
            {ill_author}
            {ill_file:small}
            {ill_file:medium}
            {ill_com:title}

        {if:elseif channel_short_name=="articles"}
            {url_title_path="explorer/article"}
            {art_txt_fr}
            {art_com:title}
        {/if}
{/exp:search:search_results}

Only the relationship field don’t parse. No error with the field name a test like that works :

{exp:channel:entries}
        {if channel_short_name=="illustrations"}
           {url_title_path="explorer/illustration"}
            {ill_author}
            {ill_file:small}
            {ill_file:medium}
            {ill_com:title}

        {if:elseif channel_short_name=="articles"}
            {url_title_path="explorer/article"}
            {art_txt_fr}
            {art_com:title}
        {/if}
{/exp:channel:entries}

Thanks in advance

-Edit 08.07.16——————————– Sorry, It was a syntax error in other part of code. Search_results is fully compatible with relationShipField displaying.

       
tdulac's avatar
tdulac
2 posts
8 years ago
tdulac's avatar tdulac

I tried also

{ill_com}{ill_com:title}{/ill_com}

it don’t work…

do I forget something ? or Search:search_results can’t display relationship field?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.