I have a theme that is subtheme to both Corolla and AT Core.
What I want to do is add pagers to the top of the comments section rather than just at the bottom. (I'm not using Advanced Forum)
I found a snippet for this. https://www.drupal.org/node/141381#comment-4984614
But after putting the code in template.php (in my subtheme folder) and adding a print to the comment wrapper template (also in my subtheme folder), nothing happens.
My theme is definitely using the comment wrapper template (other fine tuning there). But no pager...
So my question is, am I missing something special in the adaptive/corolla/subtheme arrangement that would prevent
function mytemplate_preprocess_comment_wrapper(&$vars) {
$vars['top_pager'] = theme('pager');
}
from working?
Comments
Comment #2
Jeff Burnz CreditAttribution: Jeff Burnz commentedDid you clear the cache?
Comment #3
aharown07 CreditAttribution: aharown07 as a volunteer commentedYes, thanks. Ran drush cc all.
Comment #4
Jeff Burnz CreditAttribution: Jeff Burnz commentedIn
mytemplate_preprocess_comment_wrapper()
"mytemplate" is your themes name. I really wish people posting snippets would use the correct terms here, the hook isHOOK_preprocess_comment_wrapper()
, where you replace HOOK wiht your theme or module name.Comment #5
aharown07 CreditAttribution: aharown07 as a volunteer commentedLooks to me like I have that right.
My theme is named SICorolla so my function is written like this
I've worked a little with theme functions, and have a few that are working in this theme. But so far I can't get this snippet to do anything.
Maybe the function is working and there's something wrong with how I'm printing it in the wrapper template. Tried various versions of this...
If this all looks right, it's probably something wrong my execution... come to think of it, though I flush cache like crazy from the server command line, I'm not sure I sure I flushed the browser cache, and I've seen that behave in unexpected ways in the past (I'm using Opera lately and it seems to have different refresh rules than I'm used to)
Comment #6
Jeff Burnz CreditAttribution: Jeff Burnz commentedThat is correct, the code is not wrong, check you have enough comments to trigger the pager to appear.