I would like the page numbers to display at the top of the page not the bottom. But even when I drag them to the top of the page they still display at the bottom.
Can you please advise how to get the page number to display at the top?
Cheers in advance!
Tags:
smartwebprojects replied on at
PermalinkBest AnswerReply
The default block template outputs the page content first and then the pagination links.
To make the pagination display above the page content, you can edit the block template (default location: /packages/swp_pagination/blocks/swp_pagination/view.php):
<?phpdefined('C5_EXECUTE') or die(_("Access Denied."));global$c;$nh= Loader::helper("navigation");?>
<div class="swp-pagination">
<?php$page=intval($_GET["p"]);if($page<1)$page=1;echo t('Pages:').' ';for($i=1;$i<=$pages_num;$i++){if($c->getCollectionID()>1){$pagelink=$nh->getCollectionURL($c);}else{$pagelink= DIR_REL.'/';}if($i>1){if(strpos($pagelink,"?")===false){$pagelink.='?p='.$i;}else{$pagelink.='&p='.$i;}}if($use_ajax=="Y"){$ajax_link_class=' swp-pagination-ajax-link';}else{$ajax_link_class='';}if($page==$i){$active_class=' swp-pagination-link-active';}else{$active_class='';}echo'<a href="'.$pagelink.'" class="swp-pagination-link'.$ajax_link_class.$active_class.'">'.$i.'</a> ';}$this->controller->printPageContent($page);?><?phpif($c->isEditMode()){// a tip for website admin (displayed in edit mode only)echo'<h2>'.t('To change the number of pages, edit this block').'</h2>';}?>
</div>
<?php$this->controller->outputJavaScriptFooter($this->action('ajax_get'));?>
This way pagination will be displayed above the page contents.
To make the pagination display above the page content, you can edit the block template (default location: /packages/swp_pagination/blocks/swp_pagination/view.php):
FIND THIS LINE:
MOVE THAT LINE AFTER
So, the result code will look like this:
This way pagination will be displayed above the page contents.