Updated 020 Adding Custom Admin Views to a Component (markdown)
parent
823bd7e4b0
commit
ebdaa90991
@ -16,11 +16,11 @@ The main menu drops down from Joomla's 'menu item list'. This is the specific da
|
||||
|
||||
### Targeting Item(some switches are no)
|
||||
|
||||
Remember, the company results has not been added to any of the views individually it was added to items. That's why all of these are set to 'No'. [00:01:41](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m41s) That means an item is targeted in a view.
|
||||
Remember, the company results has not been added to any of the views individually, it was added to items. That's why all of these are set to 'No'. [00:01:41](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m41s) That means an item is targeted in a view.
|
||||
|
||||
### Select Target View
|
||||
|
||||
All that need to be done is to select the view which is targeted, which is 'Company'. Use one of these options: 'Has Metadata', 'yes' or 'no', and 'Add Access', 'yes' or 'no'. [00:02:02](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m02s) Simply by selecting 'Company' it ensures that the correct view is targeted. If this is closed for a moment
|
||||
All that need to be done is to select the view which is targeted, which is 'Company'. Use one of these options: 'Has Metadata', 'yes' or 'no', and 'Add Access', 'yes' or 'no'. [00:02:02](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m02s) Simply by selecting 'Company' it ensures that the correct view is targeted. If this is closed for a moment and open that component.
|
||||
|
||||
### Showing Within The Component
|
||||
|
||||
@ -44,11 +44,12 @@ If you are uncertain you can undo everything and simply change it and compile a
|
||||
|
||||
NB. This 'order before' is only necessary when 'add' is selected to 'Main-menu' or to 'Sub-menu'. If that is used there will be a icon area displayed in the component(Cost Benefit Projection) and at the top will the menu items be shown.(Companies). Once it is opened the Sub-menu appears on the left.[00:07:34](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m34s) There is 'Main' menu and 'Dashboard (list of records)'. Now 'Dashboard (list of records)'need to be placed at the top of the components toolbar and then 'Submenu' at the left. [00:07:58](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m58s)
|
||||
|
||||
The Custom Admin View simply needs to be placed in the Sub-menu and is independent from any other dataset and then the Sub-menu method can be used. If you want a feature in the main menu, these are all the features that can be set. [00:08:25](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m25s) Whereas the 'Dashboard (list record)' feature helps to link it to a specific set of data structures. These IDs can be selected, and when you click on this combined results, the IDs of the selected items gets passed to the controller. For example: Look in 'Companies',in 'Components' ,in 'Component Builder' in 'Custom Admin Views' in 'Combined results' and then in 'Custom Buttons'. [00:08:54](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m54s) We're using the 'Main get' called 'Companies data' (getlistquery).
|
||||
The Custom Admin View simply needs to be placed in the Sub-menu and is independent from any other dataset and then the Sub-menu method can be used. If you want a feature in the main menu, these are all the features that can be set. [00:08:25](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m25s) Whereas the 'Dashboard (list record)' feature helps to link it to a specific set of data structures. These IDs can be selected, and when you click on this combined results, the IDs of the selected items gets passed to the controller. For example: Look in 'Companies',
|
||||
in 'Components', in 'Component Builder' in 'Custom Admin Views' in 'Combined results' and then in 'Custom Buttons'. [00:08:54](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m54s) We're using the 'Main get' called 'Companies data' (getlistquery).
|
||||
|
||||
The implementation of those IDs can be seen in the Data query. Reach into the input object(PHP in Editing the Dynamic get). Get the 'cid', selected 'IDs', and saying 'tt' can be 'CMD'and then 'explode' 'cid', [00:09:35](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m35s) Make sure it is 'intervals', and place it in 'ids'. This actually gets 'this' value from the 'post object', and places that into 'ids'.[00:09:59](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m59s) Validation needs to be done to ensure that the person who's trying to access the data has the right to do it. Once that is passed , those 'ids' is used to get the data.
|
||||
|
||||
[00:10:20](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m20s) In the filter '$ids' are used, and check whether all the 'ids' are in a 'id' and that in the code. Then look at the code, it's on the models 'Combine Results'. It uses the checking method. It checks the 'ids',(See video) puts it in an array and check if it's in an array then 'implodes' it. Checks whether it gets those ids. [00:10:45](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m45s) That's how the dataset is filtered with the results of the selection. That's just a glimpse in the back end at the use of those features.[00:11:07](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m07s) It is some custom scripting which were added to the Dynamic get method to take those 'ids' and to use them in intended way. This may be ignored ,this is only the way VDM has implimented this
|
||||
[00:10:20](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m20s) In the filter '$ids' are used, and check whether all the 'ids' are in a 'id' and that in the code. Then look at the code, it's on the models 'Combine Results'. It uses the checking method. It checks the 'ids',(See video) puts it in an array and check if it's in an array then 'implodes' it. Checks whether it gets those ids. [00:10:45](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m45s) That's how the dataset is filtered with the results of the selection. That's just a glimpse in the back end at the use of those features.[00:11:07](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m07s) It is some custom scripting which were added to the Dynamic get method to take those 'ids' and to use them in intended way. This may be ignored ,this is only the way VDM has implimented this.
|
||||
|
||||
If you want to drop that down, pause the video, and copy some of this area. Probably it would be the only part that will be useful for your purpose. Use the 'ids' in your code as it suits you best.[00:11:39](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m39s) Keep in mind that this PHP as seen in the code, runs before the 'Get methods'. It basically is a filtering option(see video). The 'getListQuery' starts, then that code that has been written, is entered in here(See video) and then the rest of the code which is build by Component Builder is being done. A filter option may be used with whatever you [00:12:07](https://www.youtube.com/watch?v=sPEkbuNXwds&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m07s) collected.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user