Welcome Guest, Not a member yet? Register   Sign In
Nested sets and the default url-routine of CI
#1

[eluser]Chicken's Egg[/eluser]
Today I looked at the 'modified preor tree traversal' also known as 'Celko's Tree' and 'nested set'. I have also discussed the subject with a few people, but there is one thing which I don't see. How can you implement this in Co?

Schematic the procedure in the back-end of your application would look like this:
- Login.
- Create and save a new page.
* Add meta data (such as keywords, description etc.)
* Add the name of the page.
- Select the modules (blog, news, shop) you want to use to make content available for the current page.
- Create the content. If I selected the blog-module I would for example insert a blog-message, or an index of blog-messages etc. May be I want both. Or a blog-message and a news-item together on one page.

So basically a page does not have content itself. It does have however relations with blocks and those blocks can have content from different modules. And that is were te problem starts. Because CI expects the url to be like: www.mydomain/module/function/variables. How do you guys overcome this?

An attempt:
I've been thinking of using .htaccess for this. Something like:
rewrite www.mysite.com/anything/ to www.mysite.com/mydefaultcontrol/mydefaultfunction/anything. Then I would only have to load mydefaultcontroller, which would call the needed
child-controllers. The child-controllers would drop their blocks in the parent-control (which is mydefaultcontroller) and the page would be ready. But:
- I don't know if this will work.
- I have to use unique names in that case and I am not sure if I like that (because of my we).

Does anyone have an opinion about this subject?




Theme © iAndrew 2016 - Forum software by © MyBB