By DontRemember on
Hi,
I'm referring to the API here http://api.drupal.org/api/function/theme_pager/6
I want to override the function so that I can wrap the pager with another DIV for styling.
But I cant seem to override it with my theme.
Copied the entire function theme_pager() to my template.php file. Cleared caches.
I'm only seeing 1 2 instead of 1 2 next >> last >>.
What could be wrong here?
Strangely, I tried with Garland and it worked.
Comments
Anybody? Could it be
Anybody?
Could it be something else overriding my theme's function?
same problem
Let me know if you've solved the problem !!
Thanks.
--
Jean-Pierre
I'm having the same problem,
I'm having the same problem, next, last, first and previous links don't appear.
No solution???
Bump....
Same thing here. Designing custom theme and have inserted the code from drupal documentation in template.php. (Note: tried phptemplate_ and *mythemename*_). I am using Drupal 5.1....but if it is happening in both 5 and 6...what are we missing in our themes that is not documented??
Only shows the page numbers. Next, Previous, First and Last do not appear. Has anybody come with a solution to this? *Fingers Crossed*
Lets see your query code.
Lets see your query code.
Contact me to contract me for D7 -> D10/11 migrations.
Now see ... I didn't know I
Now see ... I didn't know I needed any of that...I thought I was using template.php to replace the way it displays what is already present in Drupal. I take it that I am mistaken :(
Any links to more information when it comes to using mytheme_pager() that shows how to set up the query??
I am only going to be using the pager for items in the node table.
I'm not sure if this will
I'm not sure if this will help you guys but in the function I removed the <, <<, >, and >> characters from the next, first, you get idea and it showed up fine. However I'm not sure why.
Yeah it works!
Today I got this problem too, and its strange that just removing these characters solved the issue. I thing it may be only if we are using multi languages on our site, as in my case. But I am sure because I did not check it on a non multi lingual site.
Character encoding issue
Had also this problem. The template.php in my theme was ANSI, pager.inc is UTF-8 without BOM. I solved this by recode the special characters from UTF-8 without BOM to ANSI.
For those who may be
For those who may be wondering how to recode the characters:
1) Open template.php in Notepad
2) Click "File > Save As"
3) Select "UTF-8" under "Encoding"
Fixed the problem for me.
Works but...
Works like a charm but causes a major problem.
After this change I cannot submit any form in website. It goes to blank screen.
Nima
I should mention that this is
I should mention that this is what I found too.
this didn't work for me. I
this didn't work for me. I tried reencoding the pager code and slapping it in template.php and removing the special characters. I also tried using utf-8 for the template.php, it caused many issues across the site but still didn't solve the problem. Does anyone have any other suggestion?
A very cumbersome solution
A very cumbersome solution but it does work:
- Keep the encoding unchanged on template.php
- Write the theme_pager() template override function in a separate file that is encoded UTF-8.
- Using PHP include the separate pager file into the template.php
Yes, very cumbersome. I hope there is a better solution or it is resolved in D7...
gah, as ridiculous as it may
gah, as ridiculous as it may sound, and embarrassing to admit, i wasn't rebuilding the theme registry when i overrode [theme]_pager() .. don't forget to rebuild your theme registry!
I think that's a mistake
I think that's a mistake every single Drupal developer/themer learns the hard way. But after you learn it once, you never forget it again!
Contact me to contract me for D7 -> D10/11 migrations.