2 users online. Create an account or sign in to join them.Users

Search

for a next previous link I need to have this url http://www.tamarawobben.nl/2005-02/1 where 2005-02 is the month and 1 the page.

I have both as url parameters month and page.

Can I then do this {$root}/{$month}/{$page)+1 ?

Not sure as I haven't gotten into this kind of stuff yet, but have you tried {$page + 1}?

I will try that one. Thanks for the tip.

@davidOlivier : thanks, it worked. On {$page}+1 you get as url 1+1 instead of 2.

Another question.

Can I read a xml value into a parameter?

Can I read a xml value into a parameter?

What are you trying to accomplish ?

To find the value of the page xml value of the last article of a month. So I know where the prev/next should stop. This is another problem then this one : http://symphony-cms.com/discuss/thread/81125/ Im trying two idea's to make my site.

@ roelof, have you tried the pagination utility?
This shoud take care of the pagination and prev next functions

I have looked at it but I only need the prev and next functions so I think this utlity is bit too big for what I want.

Why don't you see if you can make the utility just display prev/next and hide all the numbers?

I see it but there is another problem. This ulity has a fixed number of articles and I don't have it. So the variable totalpages can be calculated.

You need to edit your datasource and include the pagination element which you can find in the included elements mutliple select. Then all the info you need will be available in the xml.

Thanks but it don't give the right output. when I have 3 articles, 2 on page 1 and 1 on page2 it gives totalpages=1. It must be totalpages=2.

Oh right, you're not doing pagination but instead filtering by month, trying to find the next month. I guess you're out of luck then with the pagination utility.

Correct, but I think I found a xslt solution which could work. Im going to test it today.

Correct, but I think I found a xslt solution which could work. Im going to test it today.

@roelof, if your solution works, would you mind posting the solution here in the forum? That way, if anyone else runs across this issue they will have a working solution available.

Thanks!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details