Hey everyone! I have a multi-language site that has a search function. Now each language has its own custom field in a channel for example: body_en, body_es, body_de.
The problem is that in the channel properties I can only define ONE field as the default excerpt field.
Therefore I’m trying to find out weather its possible to call a variable excerpt field when outputting to a search results page, based on the language version.
Something along the lines of this would be perfect!:
{if '{language_code}' == 'en'}
{excerpt field="blurb_en"}{read_more}
{if:elseif '{language_code}' == 'es'}
{excerpt field="blurb_es"}{read_more}
{if:else '{language_code}' == 'de'}
{excerpt field="blurb_de"}{read_more}
{/if}I’m already using ‘Search Results v1.3.4’ and this gives me the option of outputting custom fields, but not the excerpt field.
Any suggestions would be greatly appreciated!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.