PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Surrounding pager links with a DIV element

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures
View previous topic :: View next topic  
Author Message
VinzC



Joined: 18 Nov 2008
Posts: 1

PostPosted: Tue Nov 18, 2008 4:33 pm    Post subject: Surrounding pager links with a DIV element Reply with quote

Hi.

I'd like to surround the pager's links with a DIV element. Examples suggest to echo "DIV" before rendering the pager but I'd prefer the pager to do that alone since I'll be mostly using CSS to distinguish between pagers. So I guess I should derive some class. But should I derive class Structure_Datagrid_Rendering_Pager or class Pager?

Thanks for any suggestion/hint.
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Tue Nov 18, 2008 7:41 pm    Post subject: Re: Surrounding pager links with a DIV element Reply with quote

VinzC wrote:
So I guess I should derive some class. But should I derive class Structure_Datagrid_Rendering_Pager or class Pager?


Well, it depends on whether you're exclusively using Pager with Structures_DataGrid or not. If that's the case, I'd overload the S_DG_R_P class, otherwise the Pager class (or maybe one of its subclasses).
Back to top
View user's profile Send private message
veilig



Joined: 14 Apr 2008
Posts: 7

PostPosted: Fri Nov 28, 2008 7:54 pm    Post subject: Reply with quote

can't you just set a class name for your pagerOptions? that way you can use your CSS to style your div.
http://pear.php.net/manual/en/package.structures.structures-datagrid.structures-datagrid-renderer.pager.php

something like:
$pagerOptions = array('containerClass' => 'paging');

$gridPager = $dataGrid->getOutput(DATAGRID_RENDER_PAGER,
array('pagerOptions' => $pagerOptions));
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Structures All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software