micwanyoike5462
micwanyoike5462

In PHP code section:

function onStart() {
    $this['url'] = $this->currentPageUrl()
    $array = explode('/', $url);
    $this['pageNo'] = end($array);
}

If you want to get parameters from the request URL use:

Input::get("myparam");

alxy
alxy

If the page is a url parameter, there is a way better method of doing so: http://octobercms.com/docs/cms/pages#url-syntax

$this->param('page')

micwanyoike5462
micwanyoike5462

Thanks @alxy! That's far much simpler. I have been looking for such a method all over the web including in the link you provided. I definitely missed out on the explanation!

1-3 of 3