Hi folks,
Just a slightly odd problem I’ve come across that I can’t seem to find anything about in the documentation. Maybe you can explain this.
I’m writing out translation flags at the top of my site. Within the link I check to see if segments are available present, allowing me to link to the same page in another language.
My page structure may be up to 4 segments deep. So I don’t end up with /test/// this is what I’m doing:
<a href="/de/{if" title="Translate language" class="active">/images/stylesheet/flags/de.png</a>
THE PROBLEM: This approach has worked for other sites with less languages, but when I try it with all 9 languages, only a few of the links are written. The template effectively stops after writing 4 or 5 (depending on the number of segments actually there).
<div id="translate">
<a href="/{if" title="Translate language" class="active">/images/stylesheet/flags/en.png</a>
<a href="/cs/{if" title="Translate language" class="active">/images/stylesheet/flags/cs.png</a>
<a href="/de/{if" title="Translate language" class="active">/images/stylesheet/flags/de.png</a>
<a href="/fr/{if" title="Translate language" class="active">/images/stylesheet/flags/fr.png</a>
<a href="/es/{if" title="Translate language" class="active">/images/stylesheet/flags/es.png</a>
<a href="/it/{if" title="Translate language" class="active">/images/stylesheet/flags/it.png</a>
<a href="/ru/{if" title="Translate language" class="active">/images/stylesheet/flags/ru.png</a>
<a href="/jp/{if" title="Translate language" class="active">/images/stylesheet/flags/jp.png</a>
<a href="/pl/{if" title="Translate language" class="active">/images/stylesheet/flags/pl.png</a>
</div>It’s like there’s a limit on how many of these checks I’m allowed do. I can change the number of links written by changing the number of segments. Weird?
I tried to move the segment collection to a single PHP variable which i would then reuse, but I can only get this to work when PHP Parsing Stage is input and then I run into exactly the same problem.