Joomla 2.5 back end Pagination is getting but not working properly

  • I tried to work on Pagination of Joomla 2.5 Backend (I mean in Component Creation).

  • I placed pagination related data in form, It's Showing Pagination but when I am clicking on any number it's redirecting to another page.

When I click on 'new' button it's showing previous selected data(I mean count of Pagination like 10,20,... All) Please give me suggestions

Form Code

<form action="<?php echo JRoute::_('index.php?option=com_newsletters'); ?>" method="post" name="adminForm" id="newsletters-form">
        <table class="adminlist">
                <thead><?php echo $this->loadTemplate('head');?></thead>
                <tfoot><?php echo $this->loadTemplate('foot');?></tfoot>
                <tbody><?php echo $this->loadTemplate('body');?></tbody>
                <input type="hidden" name="task" value="" />
                <input type="hidden" name="boxchecked" value="0" />
        <input type="hidden" name="from" value="artist" />
                <?php echo JHtml::_('form.token'); ?>
    <?php echo $this->pagination->getListFooter(); ?>


        <th width="20">
                <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
                Artist Id
                Artist Name


 <?php foreach($this->items as $i => $item): ?>
                <tr class="row<?php echo $i % 2; ?>">

                        <?php echo JHtml::_('grid.id', $i, $item->id); ?>
                        <?php echo $item->id; ?>
                    <a href="http://<?php echo $host.'/'.$item->username;?>" target='_blank'><?php echo $item->username; ?></a>
<?php endforeach; ?>


      <td colspan="3"><?php echo $this->pagination->getListFooter(); ?></td>
  • Please, post form code here
    – Tsyba Sasha
    Jun 5 '14 at 5:38
  • Please post your model. You need to set the pagination filters in your model::getListQuery method. Also you need to specify filter_fields in your config in the model::_construct before calling parent::__construct Jun 8 '14 at 3:57
  • If you have solved your problem, please post an answer. Jan 25 '15 at 13:30

Try to insert the below code:

<?php echo $this->pagination->getLimitBox(); ?>

Get the pagination values in view.html.php

function display( $tpl = null )
    $this->pagination   = $this->get('Pagination');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.