Man this is a weird one.
Using the Wiki’d Multi-language, setting a global variable of {country_code} in the path.php file.
For this language in the site, {country_code} is set to “fr”.
My custom fields are setup so that {cf_field_name_{country_code}} == {cf_field_name_fr}, allowing dynamic language additions, with the right fields.
This code, returns examples successfully with “-fr” titles.
<h4>Locations</h4>
{exp:weblog:entries weblog="about_int_locations" dynamic="off"}
<li>< a href = "{title_permalink="{segment_1}/{segment_2}"}">
{if country_code != "en" AND cf_title_{country_code} != ""}{cf_title_{country_code}}{if:else}{title}{/if}</a>
</li>
{/exp:weblog:entries}
RETURNS:
Locations
# Belgium (fr)
# Australia (fr)
# Napierville (fr)
This second block however returns with the default (english) fields.
The only difference is placing an if count== conditional inside the weblog:entries instead of leaving the static tag outside the weblog:entries block.
{exp:weblog:entries weblog="about_int_locations" dynamic="off"}
{if count=="1"}<h4>Locations</h4>{/if}
<li>< a href = "{title_permalink="{segment_1}/{segment_2}"}">
{if country_code != "en" AND cf_title_{country_code} != ""}{cf_title_{country_code}}{if:else}{title}{/if}</a>
</li>
{/exp:weblog:entries}
RETURNS:
Locations
# Belgium
# Australia
# Napierville
Now that I know how to reproduce that error, I can work around it, but I’d still like to figure this one out if I can.
*NOTE: This same phenomenon happens inside reverse related entries tags as well. Probably others.
**NOTE2: This can be worked around by calling an embed for the given entry. Then I can use all if blocks I want in the wrapping weblog:entries tag without any problem.
