Closed mahotilo closed 6 years ago
This will fix it. But beware: Recreating sections on a Multi-Language Manager site will always use the admin UI language, because we do not have a MLM/language context on Custom Sections' Admin page.
Thx! It works. Juergen, can I ask you for one more consultation?
I try to call php function via ajax from js script in my custom section type. I can do it, but php file (where function declared ) executes out of TS context. So I can not call any TS var and functions. I have read yours posts with a2exfr on this theme, but it helps me not:) To be precise, I try to call $gp_mailer->SendEmail from js event on modal wizard button. I try to sent shopping cart content via email. Can you give me a direction to looking for an answer?
Sounds familar to me, we've done something similar here: https://github.com/webksde/Typesetter-Custom-Sections--Contact-Form (take a look at the modification to the Addon.ini described there)
Thanks. I also try to hack addon.ini but via Gadget: and unsuccessfully. I go to study your code.
Thanks Thomas.
Yes, currently this is a known weakness.
But I'll try to provide a simpler hook via PageRunScript without the need to change Addon.ini. Gimme a few minutes.
Sorry for the delay. See this commit.
Hope i'ts clear.
Thank you a lot. I feel, it's exactly what I try to do for 3 days.
Hope i'ts clear.
Not for dummies:) Is script.php a mandatory name? If yes, it's no problem. I simply want to understand correctly.
Is script.php a mandatory name?
It is. But you can always include others from there.
In the latest commit, I added a sample how to save data (a log in this case).
Thx.
When I try to "Recreate Custom sections" on any page with custom section type, that used var i18n, I get this error message. As example, I created the page with single "multi_lang_demo" section.