Building a parent-child page relationship that works on the entire tree - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Building a parent-child page relationship that works on the entire tree (/showthread.php?tid=26153) |
Building a parent-child page relationship that works on the entire tree - El Forum - 01-07-2010 [eluser]gh0st[/eluser] We are building a 5-page website, there are lots of parent-child page relationships. For example: Quote:Home I can create controllers for each of these pages, but I don't want to do this as this is no better than just simply making pages using Dreamweaver and then linking them up. I want to make a controller that utilizes a parent-child relationship that works on an entire trees. Rather than creating controllers for each of these pages; I want to use "slugs" (ie: /about-us/some-child/). I've been able to do a pages controller with a slug as a parameter, but the problem with this is that it only works for 1 level. ie: Code: class Pages extends Controller The problem is that the pages controller will not work on more than one level. My question is therefore. Let's assume you are making a 5 page website, you want to use 1 controller to handle all the parent/child relationships (it must work on the entire tree). What is the best way to resolve this issue? |