An overview
What is a component in Joomla ?
According the definition in official site,
a component is a kind of Joomla! Extension which are the main functional units
of Joomla!; An easy analogy would be that Joomla! is the operating system and
the components are desktop applications. They are usually displayed in the
center of the main content area of a template (depending on the template).
Most components have two main parts: an
administrator part and a site part. The site part is what is used to render
pages when being called during normal site operation. The administrator part
provides an interface to configure and manage different aspects of the
component and is accessible through the Joomla! administrator application.
Where to edit the components?
Path:
Your_joomla_root\cms\administrator
If the name of your component is named “video”,
your directory name should be named com_video.
The files name In orange must same at the component
name:
Files with yellow background are added for
this project.
And the file with cancel line can be ignoring.
And let have an
overviews of the MVC models in joomla:
1)
Model (administrator
part)
2)
Views (site part)
3)
Controller (administrator part)
Models:
Folder tree of these 2 folders:
1)
Models
1.1
Index.html (<- can ignore)
1.2
Video.php (<- store sql)
2)
Tables
2.1 Index.html (<- can ignore)
2.2 Video.php (<- store table 1 structure )
2.3 Videourl.php (<- store table 2 structure )
Video.php (1.2) in models is placing the sql. For an example, the sql query was placed in the function insert_video_brand() and update_video_brand();
Video.php (2.2) in tables is placing the database table field. Detailed information please referenced from the image below:
======================
Views
This is a list files tree of views
1)
Add
1.1
Tmpl
1.1.1
Default.php (<- layout of add function)
1.1.2
Index.html (<- can ignore)
1.2
Index.html (<- can ignore)
1.3
View.html.php (<- additional function for the add
page)
2)
Edit
2.1 Tmp
2.1.1
Default.php (<- layout of edit function)
2.1.2
Index.html (<- can ignore)
2.2 Index.html (<- can ignore)
2.3 View.html.php (<- additional function for the edit
page)
3)
list
3.1 Tmpl
2.3.1
Default.php (<- layout of edit function)
3.1.1
Index.html (<- can ignore)
3.2 Index.html (<- can ignore)
3.3 View.html.php (<- additional function for the list
page)
1)
Add page
The file “add /tmpl /Default.php” (1.1.1) is a page contains the
html code to control the list page layout. There is the layout:
File/view.html.php contains the additional function for
add page,
For example, the display() method to control the display
order and apply the filter to the list page display list.
2)
Edit page
The file “edit/tmpl /Default.php” (2.1.1) is a page contains the
html code to control the list page layout. There is the layout:
File/view.html.php contains the additional function for
list page,
For example, the display() method interactive with
database.
3)
List page
The file “list/tmpl /Default.php” (3.1.1) is a page contains the
html code to control the list page layout. There is the layout:
File/view.html.php contains the additional function for
list page,
For example, the display() method to control the display
order and apply the filter to the list page display list.
Controllers
1)
Admin.video.php (-> call
controller.php using require_once();)
2)
Controller.php (-> load views and set define actions)
Content in is for loading views and set
define actions:
No comments :
Post a Comment