roelof Posted May 18, 2013 Share Posted May 18, 2013 Hello, Suppose I have a url like this : sitename/category/year/month/pagenumber. Now I want to set the number of articles on a page based on values of the url. So like this : if year=2005 and month = 8 and pagenumber < 8 then number_of_articles = 1 if year = 2005 and month = 8 and pagenumber >=8 then number_of_articles = 3 if year = 2005 and month = 4 then number_of_articles= 4 If none of the above is true then number_of_articles = 3 What is the best way to achieve this in Processwire ? Roelof Link to comment Share on other sites More sharing options...
renobird Posted May 18, 2013 Share Posted May 18, 2013 roelof, Look into $input->urlSegment (about 1/2 way down the page). Link to comment Share on other sites More sharing options...
roelof Posted May 19, 2013 Author Share Posted May 19, 2013 Thanks, I will read it and I have to do this in the page template I suppose ? Roelof Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now