Pagination top and bottom

  • Posts: 87
  • Thank you received: 2
13 years 1 month ago #8792

I have edited the file in Views - products - div_listing as described in this thread to achieve having the pagination at the foot of the products as well as the top.

All is good except that the hyperlinks no longer work on either navigation.

I copied the 11 lines mentioned to the very bottom but perhaps I misunderstood:
<?php if($this->params->get('show_limit') && $this->pageInfo->elements->total > $this->params->get('limit')){ ?>
<form action="<?php echo hikashop::completeLink(JRequest::getWord('ctrl').'&task='.JRequest::getWord('task').$this->itemid.'&cid='.reset($this->pageInfo->filter->cid)); ?>" method="post" name="adminForm_<?php echo $this->params->get('main_div_name').$this->category_selected;?>">
<div class="hikashop_products_pagination">
<?php echo $this->pagination->getListFooter(); ?>
<span class="hikashop_results_counter"><?php echo $this->pagination->getResultsCounter(); ?></span>
</div>
<input type="hidden" name="filter_order_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
<input type="hidden" name="filter_order_Dir_<?php echo $this->params->get('main_div_name').$this->category_selected;?>" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php } ?>

This other issue is where to change the css for the bottom one as at present the first part appears next to the last product if the products do not fill all columns.



I can get the positioning correct if I put the above code in a DIV tag with
styles="float:left;display:inline;"
but perhaps it would be better to include this in a stylesheet.

I've also been struggling to get the Display# and pagination on the same line using css, but perhaps this is something to be done in php?

Your thoughts and advice are most welcome... as always :)

Attachments:
Last edit: 13 years 1 month ago by agrfoto.

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
13 years 1 month ago #8794

Could you give a link to that page so that we can see what's going on ?

If you want to have the display at the bottom, before the pagination code of the bottom, you should add the HTML: <br style="clear:both;"/>

Please Log in or Create an account to join the conversation.

  • Posts: 87
  • Thank you received: 2
13 years 1 month ago #8800

Added the HTML... should've known that, sorry.
So that is fixed.

To see the site you'll need to login with your user and password...

www.fotoprints.co.uk

I notice that if I remove the code again then the navigation works.

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
13 years 1 month ago #8805

The username you provided previously doesn't work anymore.

Please Log in or Create an account to join the conversation.

  • Posts: 87
  • Thank you received: 2
13 years 1 month ago #8810

I noticed that you are logged in.
Correct?

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
13 years 1 month ago #8813

incorrect :)
I tried to but it went back to the login screen.

Please Log in or Create an account to join the conversation.

  • Posts: 87
  • Thank you received: 2
13 years 1 month ago #8814

Try again now, it should work if you refresh. :)

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
13 years 1 month ago #8853

The problem is that with both top and bottom pagination displayed, you have two forms with the same name on your page and that is a problem.
Could you try to change the name of the second form to something else in order to avoid conflicts ?

Please Log in or Create an account to join the conversation.

  • Posts: 87
  • Thank you received: 2
13 years 1 month ago #8887

Yes, that did it, thanks.

Now the only thing left to sort out is getting the two parts of this footer in the same 'row'. I have tried editing the front-end stylesheet but perhaps some of it is created on the fly. Can this be altered in the same php file?

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
13 years 1 month ago #8908

You can put the display dropdown and the pagination on the same line with the CSS code:
.limit{display:inline;}

Please Log in or Create an account to join the conversation.

  • Posts: 87
  • Thank you received: 2
13 years 1 month ago #8934

Thanks Nicolas,

I also added padding to separate it :
.limit {display:inline;padding:0 20px 0 0;}

and this to the stylesheet to center it all on the page.

.hikashop_products_pagination { text-align:center; }

So now it's all complete, just a matter of adding all the products and to do this I'll be buying the business version so I can copy the products as they are all the same sizes and prices... then a bit of testing and my shop is done!

Thanks for all your help!

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum