Closed (fixed)
Project:
Skinr
Version:
6.x-1.4
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
12 Jan 2010 at 19:03 UTC
Updated:
6 Nov 2010 at 08:08 UTC
im trying to load in different template files for panels
theme.info
skinr[extras][templates][] = foo
skinr[extras][templates][] = bar
but theres no love from panels :/
Comments
Comment #1
jacineI've also noticed that I cannot put templates (for any hook) in subfolders, i.e. templates/my-template-block.tpl.php
Can we try to fix this?
Comment #2
jacineComment #3
moonray commentedThe panels template problem is fixed in CVS.
The issue with subfolders... drupal automatically searches for folders in a theme that contain .tpl.php files so there's no need to prepend the folder name. If you do, however, it will strip the slash and you will wind up with a template of
templatesmy-template-block.tpl.phpwhich is not what you want.There are two solutions for this:
1. document it
2. strip any folders to make themers not have to think (though the overhead shouldn't be needed since the template files behavior is core drupal)
Comment #4
jacineThanks Bala, I'll have to test this. I definitely don't want to prepend the directory. It just wasn't working last time I tried to drop a tpl in a subdirectory.
Comment #5
jacineComment #6
jacineOk, this is still not working (for panels). The blocks issue I mention is fixed.
It was hard to tell what the code was that corrected this in the commit log, so this may not be all of it. I applied the following to the 6.x.1.x branch to test:
In panels am able to see and select a custom panels tpl file in the panels UI ONLY if that custom tpl is inside the root directory of the theme folder. If the file is in a subdirectory, I can't even see it in the UI. Either way the custom template file is not actually used.
Test files have been added to our dev site, which has been switched back to running 6.x-1.x.
@Bala, please commit these changes (bug fixes) as you go to both branches. Trying to figure this out by looking at the commit log and diffs is inefficient at best, especially when the commits have other unrelated changes, and it ends up wasting a lot of precious time.
Comment #7
jacineThis has been committed to DRUPAL-6--1 (dev branch) in the meantime.
Comment #8
jacineComment #9
moonray commentedThere was an issue where panels wouldn't save Skinr settings if you clicked the (newly added) "Update and save" button on panels' edit content page. Fixed in CVS.
This allows us to now properly save Skinr settings, which makes the above fix actually work properly.