New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widgets with a context #5633
Comments
I'm not sure what you're asking. Are you asking for widget templates to have have access to the general surrounding page template data? |
I'm asking for the For example, if |
This might be possible by passing |
If widgets implemented in a way, that all DOM elements are scanned on the page, then it's possible to accomplish, but it will require some convention. Just an example for post.tpl
where
|
Multiple will look like this:
|
I prefer this, seems to make sense. Any objection of using this instead @NicolasSiver ? |
I'm not sure Here is an example. Let say there is a widget area in the post. For example, filter for posts provides a |
I don't think it's possible to do that at the moment. This relates closely to #4728 though. |
It's a feature request. ;) |
Hello, guys.
I'm exploring the idea to use widgets to inject plugin data.
Today, I'm asking plugin users to change their theme and include templates:
https://github.com/NicolasSiver/nodebb-plugin-ns-awards/tree/ea9491fd50b80fe28131c09544da1ee5a511827d#profile-template
Would be great, if we can use widgets for that (or a new entity). But it's not possible since widgets do not provide a context. For example, we could inject extra data in every post in the topic view, to accomplish it, the widget should capture
post
context.If it will work with widgets, theme developers could start to provide a widget placeholders for posts, account/profile, etc.
The text was updated successfully, but these errors were encountered: