Re: How to override Pager and Pager_Wrapper default HTML?
| From: | Lorenzo Alberton | Date: | Wed, 14 Mar 2007 13:23:29 +0000 |
| Subject: | Re: How to override Pager and Pager_Wrapper default HTML? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26859@lists.php.net to get a copy of this message | ||
Charles Kline wrote:
Could anyone point me in the right direction where to start with overriding the default HTML used to output links, etc. in Pager using Pager_Wrapper? What I am trying to do is modify the output of $paged_data['links'] but I am not sure where this is defined.if you look at the body of Pager_Wrapper_MDB2(), you'll see that $pager->links is assigned to $paged_data['links']: $page['links'] = $pager->links; and $pager->links is created within Pager_[Sliding|Jumping]::build() as "first + prev + links + next + last". You can create your own Pager_Custom class extending Pager_Sliding or Pager_Jumping (or the base Pager_Common class), then use it this way: $options = array( 'mode' => 'Custom', //... your other options ); $pager =& factory($options); //or $paged_data = Pager_Wrapper_MDB3($db, $query, $options); HTH Regards, -- Lorenzo Alberton http://pear.php.net/user/quipo ___________________________________________________________________ Quipo Free Internet - 2 email, 150 Mb di spazio web e molto di più. ADSL, Hardware & Software Online Store