Again unable to make output modifiers to work
(real lack of sample in the official doc by the way)
I need to display a string that comes from previous process in a place holder BUT for some reason this string must have its value changed is one case.
this [[+nomFacet]] is used in a little tpl, that is call multiple times in each regarding pages (in some filtering buttons blocks)
I choose to set a specific new i18n lexicon entries (fr + eng) for this alternate value.
The logic is:
if [[+nomFacet]] is=Particle size or is= Taille particule (comes in one or another language)
then show the alternate value from the lexicon
[[%i18n.Facet_dim_part_[[+thisParent]]? &language=[[++cultureKey]] &namespace=i18ncustom]]
else
use the originale value of the place holder [[+nomFacet]]
2h30 on it, I abdicate… can’t definitively understand the :default:hide:show is=:or:is=:else=`` salad bar.
You should try to avoid having logic like that within the templates.
Maybe. you could handle the logic there, where you set the placeholder for [[+nomFacet]]
this seems to gives some results, but unfortunately never grab the i18n string when it should (always the original place holder value.
Tested with a basic string instead of the lexicon call: same
As I also put the[[+nomFacet]] in the code I can see the values it takes.
this prooves the test does not do its jobs as intented…
I think I’ve tried some I’ll give another tr on Monday. But the solution will probably come from de php inside our specific snippet that produce a lot of those stuff.
Output modifiers tend to fail when they reach a certain level of complexity, and/or nesting. The problem is that parts of the modifier may not have been parsed at the time that other parts need them.
A custom snippet that replaces all the modifiers is almost always faster and more reliable.