Closed herbdool closed 5 years ago
My attempt to move the files was unsuccessful because I don't quite understand how to specify the new locations in the code. Can someone help?
You might need hook_theme https://api.backdropcms.org/api/backdrop/core%21modules%21system%21system.api.php/function/hook_theme/1 to register the templates. I'm not sure if it has it already.
I don't know how to do this. The Drupal 7 module has templates in subdirectories, but it does not implement hook_theme. I would be grateful for a pull request.
I think I got this. I've submitted a PR https://github.com/backdrop-contrib/views_bootstrap/pull/25 and merged it into DEV branch. I have not tested extensively, but this PR does not break my test view with a views_bootstrap accordion. I edited the views_bootstrap.views.inc file to include the proper location to the template file. See example:
function views_bootstrap_views_plugins() { .... 'theme path' => $module_path . '/templates/thumbnail',
OK, I may have merged this into DEV branch prematurely. I'm hearing reports that it may still be broken. Will do additional testing today.
Steps to reproduce warning message:
Warning: include_once(): Failed opening '/app/modules/views_bootstrap/templates/table/views_bootstrap.views.inc' for inclusion (include_path='.:/usr/local/lib/php') in include_once() (line 574 of /app/core/includes/theme.inc).
Warning: include_once(/app/modules/views_bootstrap/templates/accordion/views_bootstrap.views.inc): failed to open stream: No such file or directory in include_once() (line 574 of /app/core/includes/theme.inc).
I am still able to generate a view using a views_bootstrap accordion
OK, we need some help. the goal was to move all the tpl.php files into a subdirectory. In fact, we have them in individual sub/sub directories. Now that we've done that, we're getting these warning messages that Backdrop can't find the views_bootstrap.views.inc. We left this file in the root directory, but Backdrop seems to be looking for it in individual template directories.
Can anyone offer any advice on whether or not the current file structure for the template files is appropriate and how we should handle defining the paths so that backdrop can find both:
views_bootstrap/views_bootstrap.views.inc AND views_bootstrap/templates/table/views-bootstrap-table-plugin-style.tpl.php
Note: In it's current state, the module is working but we are getting these warning messages.
PR #26 seems to resolve the issues. Thanks to @daggerhart !
It's just a lot neater and more organized. Plus easier to see if the Backdrop version is same or differs from D7 version.