Welcome Guest, Not a member yet? Register   Sign In
Parameters to the index() method ... ?
#1

[eluser]pesho_h_k[/eluser]
Hello there Smile

i want to ask you a simple question ... and sorry if i have mistaken the section for this topic ...

so, the problem is:

my default controller is "home", and i put the paginatin class - and it works great ... i mean - it generates the links just perfectly, but :


for example - the link is

site.com/12

and in the home controller I have:

function index( $page = 0 ) {
...
}

but it doesnt open the default controller ... it shows that the page can not be found ... Sad

i tried with routing - but it doesnt pass the parameter:

$route['/(\d+)'] = "home/$1"; - doesnt work

$route[':num'] = "home"; - work, but with no parameters passed ...


can u help me please ...
#2

[eluser]Dam1an[/eluser]
You need to include index in the route, so
Code:
$route['(:num)'] = 'home/index/$1';
should work
#3

[eluser]pesho_h_k[/eluser]
yes ... yes ... yes ... Smile Smile Smile


thank you ... very much ... Smile Smile Smile




Theme © iAndrew 2016 - Forum software by © MyBB