Link to view inside subfolder does not display correctly |
09-06-2016, 07:38 PM
(This post was last modified: 09-06-2016, 10:04 PM by 678238515702801. Edit Reason: Plea for help my crops are dying )
I need to show a view that is inside a subfolder.
Just please tell me straight if "controller/method" is the only way and that "subfolder/view_file" is not possible in this context. Here is my views structure: Code: practice/ PROBLEM: I am able to show the top-level "pages/item-1.php" and "pages/item-2.php" but when I try to show "pages/item-2/subitem-1.php", it just shows the page for "pages/item-2.php". I want "pages/item-2/subitem-1.php" to be shown correctly. However it is not. routes.php PHP Code: $controller_views = 'pages/view/'; .htaccess Code: <IfModule mod_rewrite.c> Controller PHP Code: <?php welcome_message.php Code: <div id="container"> I do not understand, when I visit Pages::view() with URL "item-2/subitem-1" the variable $page=="item-2" when in my routes.php it is declared as "$route['item-2/(:any)'] = $controller_views.'item-2/$1';" so I expect it will find the view. I have also tried doing this just to hardcode catch "pages/view/item-2/subitem-1" and still 404. PHP Code: $route['pages/(:any)/(:any)'] = 'pages/view/$1/$2'; |
Messages In This Thread |
Link to view inside subfolder does not display correctly - by 678238515702801 - 09-06-2016, 07:38 PM
RE: Link to view inside subfolder does not display correctly - by Wouter60 - 09-06-2016, 11:05 PM
RE: Link to view inside subfolder does not display correctly - by InsiteFX - 09-07-2016, 07:24 AM
RE: Link to view inside subfolder does not display correctly - by Joel Catantan - 09-07-2016, 06:09 PM
RE: Link to view inside subfolder does not display correctly - by InsiteFX - 09-08-2016, 02:48 AM
|