Welcome Guest, Not a member yet? Register   Sign In
Controller parameters change depending of URL
#1

[eluser]Alface[/eluser]
I'm making an ajax pagination for my news page.
all notices have (year, month, state)

I create the ajax part as well, but I notice.. the url stays
localhost/news
all the time.. and for seo and best user navegation and SEO I want to populate ajax aplication with url values too (not just the form)

to get directly access like this:
localhost/year/month/state/page

Ex: localhost/2010/04/01/2

late I replace 04 on the url to April.. just for keep simple

My problem:

Code:
<?php
class Site extends Controller {

    function Site(){
        parent::Controller();

    function news($year = NULL, $month = NULL, $state, $page = NULL){
        }
}

The problem is year, month and state is optional..
and if I do not set year, month wil turn to year.
and if I do not set month, state wil turn to month.


undertand?

If I got keys (like $_GET) the problem was solved. But the is another way?

Thanks for everthing Smile


Messages In This Thread
Controller parameters change depending of URL - by El Forum - 04-30-2010, 07:05 PM
Controller parameters change depending of URL - by El Forum - 05-01-2010, 03:23 AM
Controller parameters change depending of URL - by El Forum - 05-01-2010, 03:59 AM
Controller parameters change depending of URL - by El Forum - 05-01-2010, 04:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB