Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

SmartyPaginate - change pagenr and style

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Boby
Smarty Rookie


Joined: 21 Jan 2006
Posts: 21

PostPosted: Sun Mar 19, 2006 7:27 pm    Post subject: SmartyPaginate - change pagenr and style Reply with quote

Hello!

This is my first attempt to use SmartyPaginate. I was using the pager plugin untill now, but I think SmartyPaginate is a bit more flexible and it's also more recent.

Because I don't want (and am not allowed) to change the default script, I need to have the paging links to point to the page number that is actually shown on the pagination.
For example:
[1] [2] [3] [4] [5] [6]
I want to have [2] linking to index.php?p=2 not index.php?p=21, then [3] linking to index.php?p=3 not index.php?p=31, and so on. Is this possible through a command or do I have to modify the plugin? If I have to change the plugin a bit, what exactly or where?

My second question is, can I make this kind of pagination?
1 2 [3] 4 5 ...
Where [3] in this example is the current page.

I am using SmartyPaginate 1.5 and Smarty 2.6.13

Thank you very much!
Kind regards, Boby.
_________________
My Homepage: www.frozenminds.com
Back to top
View user's profile Send private message Visit poster's website
Boby
Smarty Rookie


Joined: 21 Jan 2006
Posts: 21

PostPosted: Thu Mar 23, 2006 11:39 am    Post subject: Reply with quote

*BUMP*

Nobody knows a solution? Sad
_________________
My Homepage: www.frozenminds.com
Back to top
View user's profile Send private message Visit poster's website
tpr
Smarty Rookie


Joined: 27 Mar 2006
Posts: 8

PostPosted: Mon Mar 27, 2006 2:41 am    Post subject: Reply with quote

In your template do this.

{paginate_middle format="page"}
Back to top
View user's profile Send private message
Boby
Smarty Rookie


Joined: 21 Jan 2006
Posts: 21

PostPosted: Mon Mar 27, 2006 9:34 am    Post subject: Reply with quote

Yes, I've done that already, but it's not what I'm looking for.
I want [2] to point me to "index.php?p=2" not "index.php?p=21", same for the rest of the links.

Code:
{paginate_middle format="page"}
will change me just output on screen from [1-10] [2-20] [3-30]... into [1] [2] [3]...

Boby
_________________
My Homepage: www.frozenminds.com
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Mon Mar 27, 2006 3:29 pm    Post subject: Reply with quote

All the data is available in the $paginate template variable, you can create your own links and add the page value to the URL.
Back to top
View user's profile Send private message Visit poster's website
Boby
Smarty Rookie


Joined: 21 Jan 2006
Posts: 21

PostPosted: Fri Mar 31, 2006 9:55 pm    Post subject: Reply with quote

Do you mean in the template with {$paginate} or how/were can I access this template variable?

Thank you!
Boby
_________________
My Homepage: www.frozenminds.com
Back to top
View user's profile Send private message Visit poster's website
Boby
Smarty Rookie


Joined: 21 Jan 2006
Posts: 21

PostPosted: Sat Apr 01, 2006 10:29 am    Post subject: Reply with quote

Ok, I think I have found it Wink

Just the other problem needs to be fixed for me and I haven't found any solution without touching function.paginate_middle.php
I need this style of links:
1 2 3 [4] 5 6
were [4] is the current page, that is actually no link.

Boby
_________________
My Homepage: www.frozenminds.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins All times are GMT
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


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP