Skip to content

Commit 3c6673b

Browse files
authored
Merge pull request #164 from robbiejackson/restructure
restructure
2 parents d62021b + c46b0ad commit 3c6673b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1991
-1985
lines changed

docs/building-extensions/component.md

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
sidebar_position: 1
3+
title: Basic Component
4+
---
5+
Code for a basic component.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Custom Fields
2+
=======================
3+
This is the content for implementing Custom Fields in your component - tbd
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
sidebar_position: 2
3+
title: Components
4+
---
5+
Components are the main functional units of Joomla and can be viewed as mini-applications. The content is usually displayed in the centre of the web page is usually created by a component.
6+
7+
Most components have two main parts: an administrator part and a site part. The site part is what is used to render pages of your site when they are requested by your site visitors 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.
8+
9+
Joomla comes with a number of core components, for example, com_content for articles, com_contact for contacts and com_menus for setting up the website menus and menu items.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
The Model View Controller Pattern
2-
=================================
3-
This is the content for MVC (Model / View / Controller)
4-
:::caution TODO
5-
6-
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
7-
1+
The Model View Controller Pattern
2+
=================================
3+
This is the content for MVC (Model / View / Controller)
4+
:::caution TODO
5+
6+
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
7+
88
:::
Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
1-
Quicktask Link and Icon
2-
=======================
3-
4-
In general, a component has has one or more links to its views. They are defined in the manifest file and added to the menu during installation.
5-
6-
```xml title="A link to your component "
7-
<administration>
8-
<menu>
9-
COM_EXAMPLE
10-
</menu>
11-
12-
[..]
13-
</administration>
14-
```
15-
Sometimes it is useful to add a so called <strong>quicktask link</strong> which enables an action calling from the menu without first visiting the Overview.
16-
You can see this for Joomla core components, for example articles in com_content, here the quicktask is the plus icon and lets you add a new article in a single click.
17-
Your menu link is added in the manfest file during installation.
18-
19-
## Qicktask link
20-
21-
A quicktask link and icon are added as params to a menu item.
22-
23-
```xml title="Qicktask Link and icon"
24-
<menu link="option=com_example&amp;view=examples">
25-
COM_EXAMPLE
26-
<params>
27-
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
28-
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
29-
</params>
30-
</menu>
31-
32-
```
33-
34-
## Example
35-
36-
This example shows a complete menu entry with dashboard, submenu and a quicktask.
37-
38-
```xml
39-
<menu>
40-
COM_EXAMPLE
41-
<params>
42-
<dashboard>example</dashboard>
43-
</params>
44-
</menu>
45-
<submenu>
46-
<menu link="option=com_example">
47-
COM_EXAMPLE_MENU
48-
<params>
49-
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
50-
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
51-
</params>
52-
</menu>
53-
<menu link="option=com_categories&amp;extension=com_example">
54-
COM_EXAMPLE_MENU_CATEGORIES
55-
<params>
56-
<menu-quicktask-title>COM_EXAMPLE_MENU_CATEGORIES</menu-quicktask-title>
57-
<menu-quicktask>index.php?option=com_categories&amp;view=category&amp;layout=edit&amp;extension=com_example</menu-quicktask>
58-
</params>
59-
</menu>
60-
<menu link="option=com_fields&amp;view=fields&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS</menu>
61-
<menu link="option=com_fields&amp;view=groups&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS_GROUP</menu>
62-
</submenu>
63-
64-
```
1+
Quicktask Link and Icon
2+
=======================
3+
4+
In general, a component has has one or more links to its views. They are defined in the manifest file and added to the menu during installation.
5+
6+
```xml title="A link to your component "
7+
<administration>
8+
<menu>
9+
COM_EXAMPLE
10+
</menu>
11+
12+
[..]
13+
</administration>
14+
```
15+
Sometimes it is useful to add a so called <strong>quicktask link</strong> which enables an action calling from the menu without first visiting the Overview.
16+
You can see this for Joomla core components, for example articles in com_content, here the quicktask is the plus icon and lets you add a new article in a single click.
17+
Your menu link is added in the manfest file during installation.
18+
19+
## Qicktask link
20+
21+
A quicktask link and icon are added as params to a menu item.
22+
23+
```xml title="Qicktask Link and icon"
24+
<menu link="option=com_example&amp;view=examples">
25+
COM_EXAMPLE
26+
<params>
27+
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
28+
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
29+
</params>
30+
</menu>
31+
32+
```
33+
34+
## Example
35+
36+
This example shows a complete menu entry with dashboard, submenu and a quicktask.
37+
38+
```xml
39+
<menu>
40+
COM_EXAMPLE
41+
<params>
42+
<dashboard>example</dashboard>
43+
</params>
44+
</menu>
45+
<submenu>
46+
<menu link="option=com_example">
47+
COM_EXAMPLE_MENU
48+
<params>
49+
<menu-quicktask-title>COM_EXAMPLE_MENU_QUICKTASK_TITLE</menu-quicktask-title>
50+
<menu-quicktask>index.php?option=com_example&amp;view=example&amp;layout=edit</menu-quicktask>
51+
</params>
52+
</menu>
53+
<menu link="option=com_categories&amp;extension=com_example">
54+
COM_EXAMPLE_MENU_CATEGORIES
55+
<params>
56+
<menu-quicktask-title>COM_EXAMPLE_MENU_CATEGORIES</menu-quicktask-title>
57+
<menu-quicktask>index.php?option=com_categories&amp;view=category&amp;layout=edit&amp;extension=com_example</menu-quicktask>
58+
</params>
59+
</menu>
60+
<menu link="option=com_fields&amp;view=fields&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS</menu>
61+
<menu link="option=com_fields&amp;view=groups&amp;context=com_example,example">COM_EXAMPLE_MENU_FIELDS_GROUP</menu>
62+
</submenu>
63+
64+
```
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
Routing
2-
=======
3-
4-
## Search engine friendly (SEF)
5-
6-
Human-readable or clean URLs are URLs that make sense to both humans and search engines because they explain the path to the particular page they point to.
7-
8-
:::caution TODO
9-
10-
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
11-
12-
:::
1+
Routing
2+
=======
3+
4+
## Search engine friendly (SEF)
5+
6+
Human-readable or clean URLs are URLs that make sense to both humans and search engines because they explain the path to the particular page they point to.
7+
8+
:::caution TODO
9+
10+
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.
11+
12+
:::
Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
Hide Table Columns
2-
=======================
3-
4-
5-
6-
# User-defined Hide Table Columns
7-
All the core components have a button that lets the user decide which columns of a table to display.
8-
9-
## Adding Hide Table Columns to your component
10-
Adding this functionality to your own component is very simple and is usually a simple case of adding the code below to the `tmpl` file for the table.
11-
12-
### Check if you are you using WebAssetManager
13-
Look for this line of code in the php block at the top of your `tmpl` file.
14-
```
15-
$wa = $this->document->getWebAssetManager();
16-
```
17-
18-
### Already using WebAssetManager
19-
Add the following line to your existing code.
20-
21-
```
22-
useScript('table.columns')
23-
```
24-
25-
Note the line ending. Your final code will look similar to this example
26-
27-
```
28-
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
29-
$wa = $this->document->getWebAssetManager();
30-
$wa->useScript('table.columns')
31-
->useScript('multiselect');
32-
```
33-
34-
### Not using WebAssetManager (yet)
35-
Add the following code anywhere in the php block at the top of your `tmpl` file.
36-
37-
```
38-
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
39-
$wa = $this->document->getWebAssetManager();
40-
$wa->useScript('table.columns');
41-
```
42-
43-
### Notes
44-
Your table will need to be a valid html table with a `<thead>` and each column a `<th>`.
45-
46-
If you have multiple tables on the page and you want to prevent the script loading on one of those tables then you can add the class "columns-order-ignore" to the table.
47-
1+
Hide Table Columns
2+
=======================
3+
4+
5+
6+
# User-defined Hide Table Columns
7+
All the core components have a button that lets the user decide which columns of a table to display.
8+
9+
## Adding Hide Table Columns to your component
10+
Adding this functionality to your own component is very simple and is usually a simple case of adding the code below to the `tmpl` file for the table.
11+
12+
### Check if you are you using WebAssetManager
13+
Look for this line of code in the php block at the top of your `tmpl` file.
14+
```
15+
$wa = $this->document->getWebAssetManager();
16+
```
17+
18+
### Already using WebAssetManager
19+
Add the following line to your existing code.
20+
21+
```
22+
useScript('table.columns')
23+
```
24+
25+
Note the line ending. Your final code will look similar to this example
26+
27+
```
28+
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
29+
$wa = $this->document->getWebAssetManager();
30+
$wa->useScript('table.columns')
31+
->useScript('multiselect');
32+
```
33+
34+
### Not using WebAssetManager (yet)
35+
Add the following code anywhere in the php block at the top of your `tmpl` file.
36+
37+
```
38+
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
39+
$wa = $this->document->getWebAssetManager();
40+
$wa->useScript('table.columns');
41+
```
42+
43+
### Notes
44+
Your table will need to be a valid html table with a `<thead>` and each column a `<th>`.
45+
46+
If you have multiple tables on the page and you want to prevent the script loading on one of those tables then you can add the class "columns-order-ignore" to the table.
47+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Tags
2-
=======================
1+
Tags
2+
=======================
33
This is the content for Tags
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
sidebar_position: 1
3+
title: Installation and Update
4+
---
5+
This section gives an overview of how to install and update extensions on Joomla.

0 commit comments

Comments
 (0)