0

I am rendering and displaying data using theme table. I'm using

   $form['pager'] = array('#theme' => 'pager');

for displaying pagination. Now my intention is to display pager in two areas of screen. One is above the theme table and another one is below. I placed this code two times but pager is coming only once.

Can anyone please help me?

closed as off-topic by Mołot, Krishna Mohan, AjitS, Free Radical, Clive Dec 29 '14 at 21:56

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "This question was caused by a problem that can no longer be reproduced, was solved by a cache clear, or was a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers." – Free Radical, Clive
  • "Questions on programming, PHP, SQL, etc. that do not relate directly to Drupal are off-topic here, but can be asked on Stack Overflow." – Mołot, Krishna Mohan, AjitS
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Hello and welcome. Sorry, but you would need to learn basics of PHP first. Especially how arrays works and what array indexes are for. – Mołot Dec 10 '14 at 8:15
  • 1
    I'm afraid we don't have enough information to help. Where does the $form come from? You mentioned a theme table, how do you construct it? Sql query? Views? Other? In which files are you working? Etc.. – Djouuuuh Dec 10 '14 at 9:52
  • hey it's alright.. i fixed this issue.. Tx for your support – Manu Dec 10 '14 at 10:18
1

Added the below lines in above and below theme table script.

     $form['pagerTop'] = array('#theme' => 'pager'); and 
     $form['pagerBottom'] = array('#theme' => 'pager');

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