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
Hey.
I couldn't find instruction how to use datatables in this bundle so I did below stuff.
I know how to override template so I can copy Partials_scripts.html.twig and add there required JS and CSS:
The problem is it doesn't work. I see no above files in source.
Any advice? For this moment I will add datatables more manually but I will do that in proper way later.
Thanks
Lukasz
Debug info
Component
Version
Symfony version
3.3.10
AdminThemeBundle
1.3.5/dev-master/specific-commit/tag
The text was updated successfully, but these errors were encountered:
This is for dev-master, the old 1.3.x probably doesn't have implemented a better way.
Maybe the proper way to use should be use the ThemeManager described in docs.
The datatables script seems added as kernel event with the listener SetupThemeListener and in the theme manager are stored with the method registerStyle, so in theory you can recover that scripts with the method getScripts(), which has as default argument the location, which is the bottom for datatables and it handles the dependency script with bootstrap too:
The problem with that lines is that probably it will render all the scripts linked to bottom and as far I see there is not a way or method to get the scripts by id, for example getScriptsById($id) which could be used as:
Also could be interesting add some type of flag in config for enable databables in the layout, which could be used in the controller, so the twig template will know about that.
I think that could be interesting add the getScriptsById() method.
Hey.
I couldn't find instruction how to use datatables in this bundle so I did below stuff.
I know how to override template so I can copy Partials_scripts.html.twig and add there required JS and CSS:
The problem is it doesn't work. I see no above files in source.
Any advice? For this moment I will add datatables more manually but I will do that in proper way later.
Thanks
Lukasz
Debug info
The text was updated successfully, but these errors were encountered: