You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to wrapy head around what I would need to do to put the snippet rendered by your plugin into a different place in my DOM. But I do not have enough knowledge about the internals of Grav to figure it out.
I like that the logic behind the button is encapsulated in a plugin.
The most simple use case is that I want to position it relative to some element that is not body.
Do you have any idea how the current logic could be used and at the same time the developer (or the theme) could decide/configure where the code would be injected?
The default could still be the injection you are doing now, but maybe with another config toggle the control can be given yo the theme?
If there is a way to do that I'm willing to implement it. But I'm currently out of ideas/knowledge.
The text was updated successfully, but these errors were encountered:
@karfau If the administrator that installs the plugin knows the element ('id') where this element should be injected to then I could see if I can have that done. I need an 'id' element instead of a 'class' element, for I will require an unique position somewhere in the DOM. It would then be injected at the top of that element. If the element would not exist, it would still do the default action, that would be what it is doing currently.
I think that would do the trick,
I was thinking something like "there must be a better way", like a way that grav would provide, but in the slack channel I didn't get any answer that helped.
I guess since the themes are in full control of rendering the page, there is not much a plugin can do.
Might it be possible to add the data needed for a special key in the page and find a way for the theme to render your twig template with that data?
I have been trying to wrapy head around what I would need to do to put the snippet rendered by your plugin into a different place in my DOM. But I do not have enough knowledge about the internals of Grav to figure it out.
I like that the logic behind the button is encapsulated in a plugin.
The most simple use case is that I want to position it relative to some element that is not body.
Do you have any idea how the current logic could be used and at the same time the developer (or the theme) could decide/configure where the code would be injected?
The default could still be the injection you are doing now, but maybe with another config toggle the control can be given yo the theme?
If there is a way to do that I'm willing to implement it. But I'm currently out of ideas/knowledge.
The text was updated successfully, but these errors were encountered: