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");
This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
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");
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')
1-3 of 3