By warrenonline on
I'm building a custom theme for my website and I want to remove the page numbering at the bottom. I've dug through the forums and couldn't find an answer. I've seen sites where the numbers are gone, so I know it can be done. Any ideas ?
Warren
http://www.warrenonline.ca
Comments
Me too please
I found some things about disabling the pager option through advanced google search, but they're from like 2003 and I'm unable to interpret them. There's got to be an easy way. What am I missing?
Just include a pager# in css
Just include or replace if already exists in your css file
#pager {
text-align: center;
display : none;
}
Be careful though, cos this method removes page numbering from all pages.
Below this - New Edited on 11/19/2007.
CSS classes are inheritable. So for those of you who did not want to show the pager in just the front page, you can try looking for something above the #pager id that is specific to the front page. I found that .node works for me, because other pages have an extra classname or id before the #pager.
So something like this should work.
.node #pager
{
display: none;
}
Hope this helps :)
Dilip
http://www.dilipfrancis.com/
template.php
If you're using the phptemplate engine, there is a pager function you can override. Here's an explanation of how to override functions:
http://drupal.org/node/11811
is it possible to only
is it possible to only remove from home page?
Hiding the pager in arbitrary pages
Building up from franc23, you can add some .css in your page.
Make sure to check "Full HTML" source, and add this to your page:
Hope that helps,
VF
VF sorry but how your code
VF sorry but how your code helps to remove pager on arbitrary pages? it seems no different than the first code.
The following worked for me in 6.x
I wanted to not display the pager on my front page so I included this in my page.tpl.php file:
#pager { display : none; } .item-list .pager { display : none; } .item-list .pager li { display : none; } .pager-current { display : none; }}A couple of puzzles --
First, don't you have to wrap that in...?
Second, it appears to me that this solution will do the same thing as the earlier ones: disable the pager without disabling paging, so that content is distributed over multiple pages as always, except that now you can't get to it. What am I missing?
worked fine for me
This worked fine, with the exception that I had to add the style tags above like jhsachs mentioned:
Just put it in the
<head>tag of page.tpl.php.Using Drupal 6.6.
Hope this helps someone.
cheers
Bump
I would also like to know how to remove the pager. Pager uses the same title on every page and causes SE indexing and ranking problems.
Remove the Pager
I simply put the following in my themes.php file (if you don't have this file inside your themes/yourthemename/ directory then create it):
It returns an empty string for the pager, the API documentation on this function is available at: http://api.drupal.org/api/HEAD/function/theme_pager
To see this in action, visit: http://www.apaddedcell.com
Does not work for me --
I tried this, but it did not work. Drupal divides the output into pages just as it always did -- overriding the function just makes it impossible to display any page but the first! There must be another way to do it.
If your theme is called
If your theme is called "mytheme" you've to write into the template.php file (inside the "mytheme" directory) the following code:
the function name of the previous comment was wrong.
--
by FiNeX
FiNeX.org
Siti Web Vicenza
This code has a big problem
This code has a big problem anyway: ALL pager will be removed, even on the administration pages. Maybe it exists a better solution.
--
by FiNeX
FiNeX.org
Siti Web Vicenza
Body Classes
Replace you current
<body>tag in your page.tpl.php with<body class="<?php print $body_classes; ?>">Now you will have a bunch of body CSS classes you can use to get real granular with.
For example if you wanted to remove the pager from only the home page you would add this to your CSS file:
.front ul.pager {visibility: hidden; display: none;}You can use the same idea on content pages. The body classes should give you node-type class to use:
.not-front .node-type-page #main ul.pager {visibility: hidden; display: none;}or something similar to that.How about checking if its the
How about checking if its the front page?
Randaril's Code working
The code that randaril wrote here just works for me even using theme Burnt_Rubber!
That's awesome! Thank you