2 Pagers on in View - Drupal 6
I am wondering how it would be possible to have a pager at the top and the bottom of开发者_如何学C my table which I created with Views.
You can do this by copying the views-view.tpl.php from the views/theme directory, into your theme. Once it is there, edit it, and copy the lines
<?php if ($pager): ?>
<?php print $pager; ?>
<?php endif; ?>
from below the views-content
section, and place another copy above.
Note that this will duplicate the pager for all of your views. If you only need to do this on a very specific view, you can click on the theme information section of the views edit form, and it will show you all the possible templates for a specific view.
Thanks for the suggestion. I tried the custom pager module on my drupal 7 website (as for now on a local host), but could not get it to display two pagers despite the correct configuration.
As a css-addict I enclosed the top-pager in a div:
<?php if ($pager); ?>
<div class="top-pager"> <?php print $pager; ?> </div
<?php endif; ?>
I used the combined classes in a view-styles.css file that was sitting in my theme css directory
.view-titleview .top-pager {css code}
to have the pager displayed on a specific view. The class .view-titleview can be found in the source code of the specific webpage: ctrl-u in chrome or IE, or fire-bug
To show the same pager on several views, you can add the classes to the same css-code like:
.view-titleview1 .top-pager, view-titleview2 .top-pager {css code}
Remember to put a blanc space between the two classes. And don't forget to also remove the , when deleting the second combined classes.
精彩评论