hey there,
I'm trying to customize Omega's pager links (first, previous, next and last). tried the function theme_pager but it didn't change anything.
also when I switched on Theme Developer, I noticed the "prev" link was renamed to "previous"... huh.
anyway, any help is greatly appreciated.
cheers,
Luciano
Comments
Comment #1
marcoka commentedyou tried theme_pager?
how did you implement it into your template.php, you know that you need to override it and can not just put theme_pager int it?
Comment #2
luco commentedyes, I tried theme_pager. didn't change anything.
I copied the function to template.php and changed the labels... what am I missing?
Comment #3
halthDid you just copied the function or also made the needed changes to that?
Tried clearing the cache after editing template.php?
Sometimes it can save lives hehe
Cheers,
Comment #4
davidneedhamThis can be pretty annoying sometimes, so for sanity sake, lets make sure we're all on the same page.
In template.php, you should have the following (be sure to change
themenameto the name of your theme):So if you want to change the text on the buttons, find where the text is set (right below the
// End of generation loop preparation.) and change it. What you see above should be straight out of api.drupal.org's theme_pager reference except for a minor tweak. I noticed while trying this out that my site doesn't seem to like the characters put in with the text (« ‹ › ») and would print the wrapping a tags only (no text at all). After removing the characters the text showed up.If you keep having trouble, don't forget to clear your cache and refresh the page. If it still doesn't work, go grab the devel module and insert some
dsmfunctions, which will print whatever variables or text you want in a message box at the top. For example, try putting this below the$li_firstvariable:If you do that, flush your cache and refresh and you should see a message at the top that says:
dsm for first button => <a href="/path/to/the/foo/page" class="active">first</a>Good luck!
Comment #5
luco commentedthank you all, I'll make sure to give this another try and report back.
for now I'm marking as "needs more info" since the ball's in my court.
cheers
Comment #6
luco commentedit worked! I never suspected those angle quotes were to blame. thanks, davidneedham. :)
I'll open another ticket on Core because of those characters, though. I think there's a bug in there somewhere.
edit: actually, the solution is to encode the file in UTF-8 (previously encoded in ANSI), but that's tough on the noobs.
Comment #7
marcoka commentedhm? the file? i thought we talk about the altering of the pager output?
or do you mean the omega file?
Comment #8
luco commented@e-anima
template.phpis saved with ANSI encoding instead of UTF-8. that leads to errors when you try to customise how your pager is going to look.