Search the Community
Showing results for tags 'arguments'.
-
I seem to be having trouble with url segments on a projects. I'm working on an arrest report system and will provide the structure. What I have is a page called arrests in the back end that loads up an arrests.php file. Under arrests, in the back-end (with URL segments enabled), I have two pages that only store data, they don't load actual .php files. structure in the back-end (see attached photo) /arrests (loads arrests.php) -February 2016 - a page that uses a template called arrestlog that only stores data, it has no .php file -March 2016 - a page that uses a template called arrestlog that only stores data, it has no .php file when my site loads /arrests/ my arrests.php performs a find('template=arrestlog') where I display only the most recent addition, in this case data for March 2016. So, if you go to /arrests/ in a browser, arrests.php does a $pages->find() and displays only March 2016 data. What I'm trying to do is create a "next" link that loads : /arrests/february-2016/ So, when arrests is passed a url segment1 I can pull that url segment, then run a find on it to display february data. I could use /arrests/?id= method to callback arrests.php passing a parameter, but, I'd rather use a friendly url segment if possible. The end result is I'm getting a 404. Assistance is much appreciated.