Welcome Guest, Not a member yet? Register   Sign In
Best way to manage your pages
#1

[eluser]Unknown[/eluser]
Just find out about CodeIgnitor and it looks very cool. After a lot of 'old school' PHP developing I want to try building a CMS with CI.

But I'm stuck at the paging system. The thing I want is this:
Code:
-> First page
->-> Subpage
->-> Another Subpage
->->-> Subpage
-> Second page

The database model works with parentid's en position id's. Is there any simple way to get the pages from the database, put them in an array, pass them trough to the view and prints the whole array? I'm using this for an admin area.
#2

[eluser]danoph[/eluser]
http://ellislab.com/forums/viewthread/74596/
#3

[eluser]Unknown[/eluser]
Thanks! I saw that topic yesterday but I could't find it today!
#4

[eluser]m4rw3r[/eluser]
The adjacency list model can be slow, if you for example want to fetch a node deep in the tree or if you want to fetch the parents of a node, so I recommend using the Nested Sets approach: http://www.sitepoint.com/article/hierarc...database/2

discussion thread on forum and Thunder UK's model: http://ellislab.com/forums/viewthread/47671/
or my model: http://ellislab.com/forums/viewthread/74114/




Theme © iAndrew 2016 - Forum software by © MyBB