Updated 018 Custom Admin Views (markdown)

Amigo 2019-06-21 07:15:10 +02:00
parent a318e9d211
commit d10d0c2fba
1 changed files with 1 additions and 1 deletions

@ -14,7 +14,7 @@ I have a custom button area where I can add custom buttons. Click on custom butt
### Adding Script For The Controller Methods
In the php controller method, add scripting to respectively implement the buttons click method. [00:05:16](https://www.youtube.com/watch?v=gtdQ1lwB9ds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m16s) You can do that to the model as well. Add script in the controller and in the model, if you want to separate your code a bit, add scripting called from the controller. If you're not adding any script to the model, add none with two spaces (//) in front so that it won't warn that you did not add script there. As you can see the 'gotocompanies' take you back to the companies view. [00:05:47](https://www.youtube.com/watch?v=gtdQ1lwB9ds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m47s) The 'editcompany', on the other hand, implements Joomla's convention of opening an item to edit it by the correct channels. This is Joomla knowledge at work here; we are check a token, etc. [00:06:13](https://www.youtube.com/watch?v=gtdQ1lwB9ds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m13s) This snippet you can reuse for your purposes if you want. (See video.)
In the php controller method, add scripting to respectively implement the buttons click method. [00:05:16](https://www.youtube.com/watch?v=gtdQ1lwB9ds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m16s) You can do that to the model as well. Add script in the controller and in the model, if you want to separate your code a bit, add scripting called from the controller. If you're not adding any script to the model, add none with two spaces (//) in front so that it won't warn that you did not add script there. As you can see the 'gotocompanies' take you back to the companies view. [00:05:47](https://www.youtube.com/watch?v=gtdQ1lwB9ds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m47s) The 'editcompany', on the other hand, implements Joomla's convention of opening an item to edit it by the correct channels. This is Joomla knowledge at work here; we are checking a token, etc. [00:06:13](https://www.youtube.com/watch?v=gtdQ1lwB9ds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m13s) This snippet may be reused. (See video.)
### Area For Custom Scripting