Hello,
I put an advanced_forum.forums.tpl.php in my sites/all/themes/THEME folder and it is auto discovered. However, when I move it into another folder (e.g. sites/all/themes/THEME/templates) it is no longer detected. My other Drupal core template files (e.g. node.tpl.php) in that folder work well.
Is the documentation at http://drupal.org/node/512116 still correct?
Thanks,
Comments
Comment #1
michelleIt might depend on which template. There is a core "bug/feature" where it won't discover alternate templates unless the master template is in the same directory. (ie: It won't find node-article.tpl.php if you don't have node.tpl.php in the same directory). Since "forums.tpl.php" is actually a core template, not an AF one, it may be considered an alternate in this case whereas a native AF one would work.
This is just a theory. I'm not in a position to test right now if that's the case. I'll dig into it some more but not sure how soon I'll be able to. Between trying to get Alpha 4 out and dealing with the git conversion, I'm pretty swamped.
Michelle
Comment #2
tea.time commentedI just ran into nearly the same issue, and I think Michelle's suspicion is correct.
jcisio, it looks like you were implementing an Advanced Forum style per the documentation you mentioned, whereas I am simply trying to override some of the Adv Forum templates by adding them into my theme's directory and expecting them to be discovered in typical Drupal fashion.
So I had them in sites/all/themes/THEME/templates. I was confused for quite awhile because some of them were getting picked up while others were not. But after finding this issue, it turned out that yes: I needed to add forums.tpl.php to make advf-forums.tpl.php discoverable; same for [advf-]forum-list.tpl.php and [advf-]forum-topic-list.tpl.php -- because all of these are templates from the core forum module, and Adv Forum is overriding them.
(And the templates that Adv Forum itself defines in its implementation of hook_theme() were the ones that worked for me regardless, in my theme's subfolder.)
Comment #3
jcisio commentedThe problem was that there is no forums.tpl.php in THEME nor THEME/templates. And put advanced_forum.forums.tpl.php in THEME works, but it does not work in THEME/templates.
I was testing it without success. I created only that one template file. Later, I tried something like this and it's what I'm using now: I put this line into my theme.info:
Then in advforum I create one subfolder for each style, and put my files there.
Comment #4
michelleLooks like this was solved.