[eluser]elmne[/eluser]
[quote author="pbreit" date="1281672372"]Joomla compares to Expression Engine (they are both CMSs) but I'm not sure it does to CodeIgniter. Joomla and EE come with a *lot* of content management and other application functionality out-of-the-box.[/quote]
The reason i was comparing is because Joomla is classified as an MVC framework. That is, the platform on which Joomla is built is an MVC framework, and the components and modules are built using an MVC approach.
I suppose my challenge is figuring out how different content can be displayed on a page, as i will illustrate in the diagram below
LINE 1 - Positions in the template
LINE 2 - viewers with data loaded into above positions
LINE 3 - Functions in the controller that get data and load it to the viewer above
LINE 4 - The controller that holds the function(s)
Code:
PAGE TEMPLATE(that has the positions that controllers pass data to)
POSITION1(header) POSITION 2(left) POSITION3(center) POSITION4(right) POSITION5(footer)
| | | | |
logo, top menu Main menu Content Area Login window bottom menu
| | | | |
logo function Menu function content function login function menu function
topmenu function featured function
| | | | |
Controller1 Controller2 Contoller3 Controller4 Controller5
How can this be achieved in Codeigniter, as any web application will require a layout of some form like this. With a header, center area, possibly left and right areas and the footer.
Tags exist in these areas as positions in which content from the controller is passed on to the viewer.
Each function requires a viewer to display its information. For instance, login window requires a login viewer, menu requires a menu viewer.
These are then all enacase within a main viewer which can constitute the template that the application uses.
The problem then becomes how to get the different controllers to work together. Because each of them can be used to specify a URL. How then can i get the controllers to be called to output their data to one template via the viewer, while having one controller that controls navigation on the template?
Beacause at the moment, to achieve this process, i have to use one controller that has all the functions which will return data to be displayed on the viewer.
But this becaome impractical after a while as it means one controller has to hold each and every function to be used
Header function
main menu function
content are function
login function
footer function
featured function
etc
and also this often means multiple functions, not just one. For instance for one step,
- receiveing submitted form
- validation
- passing validated data to a method
- generating confirmation page and loading it to the viewer
Is there a way that a controller can be called within a controller so that each separate process, such as main menu, content, login, etc, can be split into its own controller, yet get the system to work as one?
Or could someone advice how best to achieve the above functionality in Codeigniter ?