Welcome Guest, Not a member yet? Register   Sign In
[cms] page handling
#1

[eluser]douweegbertje[/eluser]
Hello guys,

I'm working on a CMS using HMVC.
Basically I have a "core" controller who handles all my request as a bootstrapper by using route:
Code:
$route['.*'] = 'bootstrap/route';

Then I want to initialize the pages of course, although I am not really sure how to do this "correctly".

Let me sum up my thoughts, and maybe I can get some advice to do it better:

bootstrap controller:

- Check the page:
Basically a page can have segments like: info/location/contact
Obviously I need the data for the page "contact", while keeping in mind that its linked after info/location.

At first I thought to just get the last segment (contact) and collect the data. But if you would enter bla/contact, you end up with the same info.

So I think I have to collect the data from the database using the full URL which is info/location/contact to get that page?

Well in the end I would end up with a page and forward this to a lib "pages" or something like that.


- pages lib:
Basically if I know what page it is, I would collect the linked modules on that page and process it in there own lib.

Then everything gets back to the bootstrap, and gets inserted into the page.


So, then my question is:
- Is this sort of the correct way to process the page handling?
- What is an efficient and safe way to process and identify a page to make use of it in the backend?







Theme © iAndrew 2016 - Forum software by © MyBB