Deep level argumenting |
[eluser]RobertR[/eluser]
I think, this probably is novice question, but I am novice in CodeIgniter Well here is the problem, I'm trying to make categories and subcategories (dynamically generated) for store, and the main problem is that, I could manage to set different options to main category with _remap function in my controller. But, if I am trying to get deeper, then the same _remap function applies, and I am stuck there. For example, the main category uri is http://project.com/store/fruits/, but for the subcategory, of course - http://project.com/store/fruits/apples. I want to apply different view to 3rd segment, and still be able to control main category (fruits) with _remap function. I want to use one controller over and over, but I think, it must be crazy to copy and paste the same function content for all subcategories (hundreds of them, disguised). Maybe there is some way to do that, but I can't find out how... Help here! /Rob
[eluser]Lotus[/eluser]
remap has a second parameter $params which is an array of the other parameters passed in. So... Code: function _remap($main_category, $params = array())
[eluser]RobertR[/eluser]
All right, and what should be those other parameters?
[eluser]Aken[/eluser]
The parameters are pulled from your URI. http://ellislab.com/codeigniter/user-gui...passinguri
|
Welcome Guest, Not a member yet? Register Sign In |