Closed (works as designed)
Project:
filedepot
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2010 at 11:45 UTC
Updated:
30 Dec 2016 at 10:03 UTC
Jump to comment: Most recent
Comments
Comment #1
blainelang commentedCan you be more specific - what theme file where you trying to over-ride and how?
Comment #2
svendecabooterSure... I tried to override activefolder_admin.tpl.php.
I put a file named like that in my theme folder, copied the HTML from the original activefolder_admin.tpl.php file and adapted it.
After doing so the folder administration page would no longer show up...
Comment #3
blainelang commentedSpent time on this one but no solution yet. There is a core D6 issue #279573 which it would appear is the cause and preventing the template file over-ride.
A workaround that I read in that issue, is that you have to copy over the parent template as well and in my case, that was the main theme file page.tpl.php which I did, clear cache and still no joy.
BTW: I have made a change in CVS as the naming of the modules main template file as page.tpl.php was a very bad idea and now it's called filedepot-mainpage.tpl.php.
I am changing the issue status to postponed for now and will spend more time on it, if anyone has some suggestions or can confirm the source of the issue.
Comment #4
sambc commentedI'm not seeing any change when I copy filedepot-mainpage.tpl.php over to my theme directory and edit it; I've cleared the cache, force-refreshed the page, and no change.
If it helps, I'm trying to slightly tweak the appearance of the toolbar, as it goes rather wonky in the space I have for it, which appears to be to do with a larger text size than expected (or something like that) - the search box overspills its width, appears to be positioned relative to something other than the toolbar, and so on - the toolbar ends up crowded because of the fixed-width of elements, you get the idea. The 'simple' fix I thought would be to theme it with a template, but the template doesn't seem to get picked up. Theming Views by the same mechanism didn't need me to do anything but copy/rename/edit the template file...
Comment #5
nibo commentedHi,
I had the same issue in the D7 dev version.
A quick and dirty solution was to create a module, copy the templates I wanted to override and use Drupal's theme_registry_alter() hook:
Comment #6
blainelang commentedThanks Nikolay for your posted solution.
Comment #7
beefheartfan commentedIf you want to override all the filedepot templates with your helper module without hard-coding every single template (like #5 above) you could use code like this:
Comment #8
stefan.kornAs of D7 this is happening due to https://www.drupal.org/node/342350
Drupal is only picking up template files in theme folder if the template name matches the theme key (replacing underscores in key with hyphens in template). Since Filedepot is not using matching template names on all theme keys it happens for some templates that they will not get picked up in the theme.
A maybe leaner and cleaner solution using hook_theme_registry_alter to fix this could be like below. You would then also need to rename the template to match the new name when you copied it to the theme folder.