I've spent some time trying to find how to get a YAMS placeholder value but got nothing.
There is no problem to write (yams_id) in a chunk and get the value.
But I can't get how to get this value from a snippet.
$modx->getPlaceholder doesn't work.
It turned out, that php code: echo "(yams_id)" will return a proper value of this YAMS variable.
That's cool, but I still don't know how to check this value in php code.
I want to write a snippet that output the text according to current language.
(A "More articles" phrase). How can I do that?
Thanks, that works)
How did you know that?
sorry to be a bit slow to answer...
actually, i've learnt a lot reading yams source code
if you have a look at yams snippet you'll see it starts with
the first thing i needed when writing my first own multilingual snippet
afterwards, still reading yams source code but yams class in the class folder, you will find nearly everything you may need to play with it
réfléchir avant d'agir