|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Boby Smarty Rookie
Joined: 21 Jan 2006 Posts: 21
|
Posted: Sun Mar 19, 2006 7:27 pm Post subject: SmartyPaginate - change pagenr and style |
|
|
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 |
|
Boby Smarty Rookie
Joined: 21 Jan 2006 Posts: 21
|
Posted: Thu Mar 23, 2006 11:39 am Post subject: |
|
|
*BUMP*
Nobody knows a solution? _________________ My Homepage: www.frozenminds.com |
|
Back to top |
|
tpr Smarty Rookie
Joined: 27 Mar 2006 Posts: 8
|
Posted: Mon Mar 27, 2006 2:41 am Post subject: |
|
|
In your template do this.
{paginate_middle format="page"} |
|
Back to top |
|
Boby Smarty Rookie
Joined: 21 Jan 2006 Posts: 21
|
Posted: Mon Mar 27, 2006 9:34 am Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Mar 27, 2006 3:29 pm Post subject: |
|
|
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 |
|
Boby Smarty Rookie
Joined: 21 Jan 2006 Posts: 21
|
Posted: Fri Mar 31, 2006 9:55 pm Post subject: |
|
|
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 |
|
Boby Smarty Rookie
Joined: 21 Jan 2006 Posts: 21
|
Posted: Sat Apr 01, 2006 10:29 am Post subject: |
|
|
Ok, I think I have found it
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 |
|
|
|
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
|