Page numbers in News

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
palun
Forum Members
Forum Members
Posts: 43
Joined: Sun Aug 02, 2009 9:08 am

Page numbers in News

Post by palun »

Hi,

Does anyone know how to get the paging function in the news module to show page numbers like this:

1 2 3 4 5 6 7 8 9

instead of arrows like this:

>>

This question has been asked before (http://forum.cmsmadesimple.org/index.ph ... 738.0.html), but there was no answer.

I found a solution to a similar problem here:
http://forum.cmsmadesimple.org/index.php?topic=10188.15
but the code is far beyond my knowledge of PHP.

If only I could get access to an array with links to the different news pages...

Grateful for any suggestions.

Cheers
/ulf
Peciura

Re: Page numbers in News

Post by Peciura »

It is easier than you think.

a. make sure you are using ugly url
b. create an UDT  ( i called it {pagination} at the very bottom of post)
c. post your summary template
d. write exact pagination string , e.g.
  >>
palun
Forum Members
Forum Members
Posts: 43
Joined: Sun Aug 02, 2009 9:08 am

Re: Page numbers in News

Post by palun »

Hi Peciura
Thanks for your answer!

I am still not sure what to do though... I tried adding your pagination-udt to the bottom of my summary news template, but I don't know enough about the parameters...

Here's what I have / what I did:

-- I have a page with alias "newspage" in which the only content is this: {news number="3" lang="sv_SE" summarytemplate="newstmpl" category="General"}

(-- The template "newstmpl" is a slightly modified news summary "Sample" template - with the usual pagination.)

-- I created a UDT, {pagination}, from your code posted here: http://forum.cmsmadesimple.org/index.ph ... 88.15.html .

-- I added a call to the UDT to the bottom of template "newstmpl", but I don't know ho to set the parameters right. Could you help me out?

These are the parameters I don't understand:

'link' -- Is this the page alias? ("newspage" in my case)

'param' -- This is a "Unique part of url param". Could you explain further?

'assign' -- The variable I assign here would be an array of URLs to all news pages, is that correct? (If so, that would be great!)

'pattern' -- What should I put here? (I can ignore this and use the default, right?)

'extreme' -- (I don't need this, do I?)


If I knew more PHP I probably should be able to figure some of this out myself. Sorry for being such an idiot.

/ulf

PS. I'm using CMSMS 1.8.2 (with News 2.10.6) on XAMPP (localhost).
Peciura

Re: Page numbers in News

Post by Peciura »

I have answered to your question on original thread http://forum.cmsmadesimple.org/index.ph ... #msg227790
I will edit that post if needed.
palun
Forum Members
Forum Members
Posts: 43
Joined: Sun Aug 02, 2009 9:08 am

Re: Page numbers in News

Post by palun »

Thank you!
Much appreciated!
/ulf
Post Reply

Return to “CMSMS Core”