-
Posts
31 -
Joined
-
Last visited
-
Days Won
2
Posts posted by ralberts
-
-
Looks great, I'll give that a go.
Thanks Martijn!
-
Sorry about highjacking this topic, but the subject seems fit. Wouldn't it be nice if the image itself had a multilanguage option too? After all: images might as well contain text. A banner image would be an obvious example. I currently see no easy way to differentiate between languages in order to display the correct image.
Accessing PageTitleLanguage when bootstrapped
in Multi-Language Support
Posted
Hi folks,
I'm looking to return results from PW in an Ajax call, but I'm not sure if I'm going about this the right (or preferred) way.
I created a script in /htdocs/public/ajax/affiliates.php, which is called using Ajax.
The script itself bootstraps Processwire and returns JSON for all affiliates. It looks something like this:
The problem here is that $affiliate->title returns an object (LanguagesPageFieldValue), instead of the actual string I would expect it to do.
I'm not sure where I'm going wrong here. I may have to manually set the language, call the title in a another manner, or just use a different approach alltogether. Any help is much appreciated