Javascript embedded in the widget can't access the jquery object on page load since jquery hasn't loaded yet. You can use something like this
(function() { function onLoad() { // widget code } if (window.jQuery) { onLoad(); } else { window.addEventListener('DOMContentLoaded', onLoad); } })();Solved translation for widget content
-
In my languagefile, I have all the transaltions
{ "greeting": "Oh, Hi." ... }
.When I include
[[mytheme:greeting]]
in template files, the correct text will be displayed.
But in widgets as title or html content, I get the logMissing translation "mytheme:greeting"
.
Why so? -
so it's not possible, using translation in widgets?
But it's weird, that nodebb is recognizing it as a translation. -
got it! had to add the folter/files for the default language
en-GB
as set in apc, even though my user account language isde
. -
This post is deleted!
Suggested Topics
-
Solved Widgets zones in themes
Plugin Development • • Nicolas
Copyright © 2022 NodeBB | Contributors