Widget system
-
Hey
Hope you can help me point me in a direction of some code/documentation.
I'm thinking of developing a Widget and can't find any information on the context in which a widget lives. The widget I am thinking about developing should show information about the content of the thread/post, so when you are browsing a thread about a specific subject, related articles are shown in a widget.
The widget of course doesn't make any sense in a context outside a thread.
And my problem is that I can't find any information about the context in which the widget is operating.
BR
-
nodebb-widget-essentials/library.js at master · NodeBB/nodebb-widget-essentials
Several basic widgets bundled together in one package including 'HTML', 'Markdown', 'Recent Replies', 'Active Users', and 'Moderators' - nodebb-widget-essentials/library.js at master · NodeBB/nodebb-widget-essentials
GitHub (github.com)
Should give you some ideas, the active users widget changes behaviour based on where it is displayed, if its inside a topic it shows the poster in that topic, if its inside a category it shows recent posters in that category etc.
widget.area.url
gives the url of the page the widget is in.