For creating search results I've got a channel field where the path to the page is stored (eg. /products/bikes). Each entry has it's own path.
Because there are different channels, every channel has it's uniquely named channel field.
For the channel "products" it's: {products_search_path_nl}
.
Within the results page {exp:search:search_results}
the field is dynamically created like this: {channel_short_name}_search_path_{language}
which is displayed as products_search_path_nl
.
The issue is that it does not get parsed. After looking at EE's parse order I've tried:
{embed="search/uri_embed"}
{embed="search/uri_embed" passed_var="{channel_short_name}"}
{if "1" == "1"}
Thanks for reading! Any help would be appriciated!
Thanks to Low's suggestion I used a loop, since this seems impossible to solve in a propper manner.
{if "{channel_short_name}" == "news"}
{if "{news_search_path_{language}}" != ""}
<h3><a href="{base_url}{news_search_path_{language}}{url_title}">{title} </a></h3>
{excerpt}
{/if}
{if:elseif "{channel_short_name}" == "products"}
{if "{products_search_path_{language}}" != ""}
<h3><a href="{base_url}{products_search_path_{language}}{url_title}">{title} </a> </h3>
{excerpt}
{/if}
// ....... and so on