J 1.5: Architecture of the components
Posted: Thu Nov 22, 2007 11:15 pm
I'm new to creating joomla components, and it's a bit complicated for me to understand the principles of the component.
I've made the hello world tutorial, and it worked, but there are still basic things i cannot understand.
So, lets take the com_hello.
1. hello.php - loads the controler from controller.php and then executes the task (the default task is display(), right?).
2. controller.php - implements the controller. the function display() - does what?
When are the model and the view invoked?
Let's say i need the same com_hello component to display either a hello message or a goodbye message. How and where should add the function(s) to display goodbye? And would the goodbye page be accessed by adding "task=goodbye" to the URL?
Hope you can help me a bit.
I've made the hello world tutorial, and it worked, but there are still basic things i cannot understand.
So, lets take the com_hello.
1. hello.php - loads the controler from controller.php and then executes the task (the default task is display(), right?).
2. controller.php - implements the controller. the function display() - does what?
When are the model and the view invoked?
Let's say i need the same com_hello component to display either a hello message or a goodbye message. How and where should add the function(s) to display goodbye? And would the goodbye page be accessed by adding "task=goodbye" to the URL?
Hope you can help me a bit.