Removing the Start, Prev, Next, End from pagination?

2,550 views
Skip to first unread message

Matt Thomson

unread,
Sep 14, 2010, 9:40:44 PM9/14/10
to Joomla! General Development
Hi All,

Does anyone know if there is a way to remove the Start, Prev, Next,
End from the pagination footer that is usually shown in the frontend
(without hacking the core).

I've had a look at libraries/joomla/html/pagination.php
getPagesLinks() function, but I can't see a way.

I can probably find a way to hide them with css as a last resort, but
it would be nice to do it in the php.

Thanks,

Matt.

Lukas Polak

unread,
Sep 13, 2010, 10:33:21 PM9/13/10
to joomla-de...@googlegroups.com
Hi Matt,

there is a way to override whole pagination output in your template. you
have to add pagination.php into {your_template}/html/ directory. Look
into "rhuk_milkyway" folder. you can find pagination.php in its html
directory and reuse its code.

Lukas

dudee

unread,
Sep 14, 2010, 11:01:19 PM9/14/10
to joomla-de...@googlegroups.com
Hi

Modify the pagination_list_render() function in your pagination override. Just comment out the lines where it adds the links you dont want.

Andy
www.katcode.com

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.


Matt Thomson

unread,
Sep 14, 2010, 11:19:37 PM9/14/10
to Joomla! General Development
Thanks, but I probably should have said I'm doing Joomla extension
development (the extension is on the JED), so I don't have any control
over the template, everything I do has to be in the component/module/
plugin.

On Sep 15, 3:01 pm, dudee <andy.na...@gmail.com> wrote:
> Hi
>
> Modify the pagination_list_render() function in your pagination override.
> Just comment out the lines where it adds the links you dont want.
>
> Andywww.katcode.com
>
> On Mon, Sep 13, 2010 at 7:33 PM, Lukas Polak <polak.luka...@gmail.com>wrote:
>
> >  Hi Matt,
>
> > there is a way to override whole pagination output in your template. you
> > have to add pagination.php into {your_template}/html/ directory. Look into
> > "rhuk_milkyway" folder. you can find pagination.php in its html directory
> > and reuse its code.
>
> > Lukas
>
> > Dňa 15. 9. 2010 3:40, Matt Thomson wrote / napísal(a):
>
> >  Hi All,
>
> >> Does anyone know if there is a way to remove the Start, Prev, Next,
> >> End from the pagination footer that is usually shown in the frontend
> >> (without hacking the core).
>
> >> I've had a look at libraries/joomla/html/pagination.php
> >> getPagesLinks() function, but I can't see a way.
>
> >> I can probably find a way to hide them with css as a last resort, but
> >> it would be nice to do it in the php.
>
> >> Thanks,
>
> >> Matt.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Joomla! General Development" group.
> > To post to this group, send an email to
> > joomla-de...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > joomla-dev-gene...@googlegroups.com<joomla-dev-general%2Bunsu...@googlegroups.com>
> > .

Andy

unread,
Sep 15, 2010, 12:39:04 AM9/15/10
to joomla-de...@googlegroups.com
In this case css is the best solution.



To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.

Matt Thomson

unread,
Sep 15, 2010, 5:38:23 PM9/15/10
to Joomla! General Development
I ended up doing it with javascript, as the elements keep switching
from spans (inactive) to links (active) as the page changes, so it's
hard to know what to target.

If anyone else does this, here is what I done (using mootools):

var pagWrapper = $
('my_pagination_wrapper').getElement('span[class=pagination]');
var pagChildren = pagWrapper.getChildren();

pagChildren.each(function(el,index)
{

//if the element is one of the first 3, or the last 3, hide it
if(index < 3 || index > (pagChildren.length - 4) )
{
el.setStyle('display', 'none');
}

});



On Sep 15, 4:39 pm, Andy <andy.na...@gmail.com> wrote:
> In this case css is the best solution.
>
> > <joomla-dev-general%2Bunsu...@googlegroups.com<joomla-dev-general%252Buns...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages