Page 1 of 1
cms_selflink navigation problem
Posted: Mon Jul 03, 2006 9:02 pm
by Nat
Hi,
I'm looking for a way to make a navigation in my news-section. I want only (let say) 10 news shown on one site. If there are more news, a menue with previous/next & page numbers appears (like in google if you have more hits or here in the forum if a topic has more posts...). I tried to use the cms_selflink tag, but couldn't find the correct parameters. Unfortunately I wasn't very successful by using the search function (both in the forum and the rest of the site). Perhaps somebody can help me.
Many thanx in advance.
regards,
Nat
Re: cms_selflink navigation problem
Posted: Fri Jul 07, 2006 11:38 am
by Nat
hmm.. seems that nobody can help.
Peerhaps I have to code it myself...
Re: cms_selflink navigation problem
Posted: Fri Jul 07, 2006 2:51 pm
by Mesmer
Why not use the news module which does this
Re: cms_selflink navigation problem
Posted: Fri Jul 07, 2006 4:14 pm
by Dr.CSS
i don't think the News module does this on its own, you may have to make another page that you can set to not show in the menu, with the news tag and the start='11' parameter, on the first page you can put at the bottom a word link, like 'More', using the orange palm tree button link generater, the second page you set to not show in the menu will show there so you can link to it, i've done this to my page called Imap2 to show you, if you go to
Imap1 you will see the
Imap2 link at the bottom but not in the menu or the next/prev. links at the bottom of the page :.
ps. the Imap menus' are under the News dropdown in the menu on that page, you will see Imap1 and Imap3...
Re: cms_selflink navigation problem
Posted: Sat Jul 08, 2006 8:56 am
by Nat
First of all: thanx for the replys.
I'm using the news module.

Although I haven't found a way how to solve my problem with this module.
On my old site I wrote cms my own news-module that was able to solve this problem. If I have more than 5 news, a navigation is created: "". Perhaps there is a tag that can create exactly this navigation, but I have no idea how this is called.

Re: cms_selflink navigation problem
Posted: Sat Jul 08, 2006 9:54 am
by cyberman
Nat wrote:
Perhaps there is a tag that can create exactly this navigation, but I have no idea how this is called.
The template engine of CMSms is Smarty, the navigation is called pagination - your must only search for SmartyPaginate
http://www.phpinsider.com/php/code/SmartyPaginate/
But attention - it's a plugin for smarty, not for CMSms ...
But I'm not a coder for real. So it would be nice if you can show a solution for CMSms content pages here based on SmartyPaginate.
Re: cms_selflink navigation problem
Posted: Sat Jul 08, 2006 11:05 am
by Nat
Hmm... I'm thinking of writing a tag to solve this problem. No idea if it works the way I want. Not sure if it is a good idea to add a plug-in to smarty that is not "officially" supported by cmsms...

Re: cms_selflink navigation problem
Posted: Sat Jul 08, 2006 12:20 pm
by Dr.CSS
Go for it! i've seen this asked for before, i'm sure it would be welcomed...
Re: cms_selflink navigation problem
Posted: Sat Jul 08, 2006 12:38 pm
by cyberman
Nat wrote:
Not sure if it is a good idea to add a plug-in to smarty that is not "officially" supported by cmsms...
There are a lot of very useful plugins for smarty they are not come with smarty on official CMSms release
http://smarty.incutio.com/?page=SmartyPlugins
which can called normally with {smartyplugin}.
Re: cms_selflink navigation problem
Posted: Wed Sep 13, 2006 7:24 pm
by rcp
Hi!
I'm also in desperate need of pagination. I guess I'll have to PHP'it myself.
Does anyone know how to retireve the numbers for the start item, items per page and total items? They're not in the gCms variable, right?
Thanks in advance!
Re: cms_selflink navigation problem
Posted: Wed Sep 13, 2006 8:52 pm
by cyberman
rcp wrote:
Does anyone know how to retireve the numbers for the start item, items per page and total items? They're not in the gCms variable, right?
Hmm, if I'm right its $start, $number and (not sure) $count or count($entryarray) - please look at action.default.php. But I'm not a coder for real, would be nice if you could post your paginate solution here

...
Re: cms_selflink navigation problem
Posted: Fri Sep 15, 2006 12:05 pm
by rcp
Check the quick hack I've made for pagination in the News module here:
http://forum.cmsmadesimple.org/index.ph ... 217.0.html
Re: cms_selflink navigation problem
Posted: Fri Sep 15, 2006 12:13 pm
by cyberman
A big thank you
