Updated 013 dynamicGet (markdown)

Amigo 2019-06-17 11:15:02 +02:00
parent 0b4dcec08f
commit 01edb304ca
1 changed files with 5 additions and 7 deletions

@ -54,16 +54,14 @@ Possibly when we look at the site layout area as well as the templates, I'll be
### Dynamic Get Custom Script
Returning to the dynamic get, it can be seen that there is a custom script area. If you click on it, you will see different switches. [00:21:54](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m54s) You can select 'getlistquery' or 'before getting the items' and 'after getting the items'. If you select 'after getting the items' and you place any code there, then data gets dumped right after the initial items you have received. [00:22:14](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m14s) It will add that code in there, and then return the items. That is why you can model the data right there in the dynamic get. You are going to write the code for the data after it has been 'get'. It can be checked if this code has been removed here, it will indicates if there is an array of items where all values are.[00:22:33](https://wmalfuntionww.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m33s) <<<<<<<
Then I'm just saying I want to be sure that those items are set, and that they are there before I start doing it on each of them. Here I'm using the string bracket component helper functions to check whether the string is there. You can dump some nice PHP. Even before getting the item you can add some filters or get list query, [00:23:02](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m02s) if this is model list. If this is item, you'd see that there's a different set of switches is available. It adjusts to the type of query up here. [00:23:19](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m19s)
Returning to the dynamic get, it can be seen that there is a custom script area. If you click on it, you will see different switches. [00:21:54](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m54s) You can select 'getlistquery' or 'before getting the items' and 'after getting the items'. If you select 'after getting the items' and you place any code there, then data gets dumped right after the initial items you have received. [00:22:14](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m14s) It will add that code in there, and then return the items. That is why you can model the data right there in the dynamic get. You are going to write the code for the data after it has been 'get'. It can be checked if this code has been removed here, it will indicates if there is an array of items where all values are. [00:23:02](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m02s) Make sure that those items are set and that it is there. A 'string bracket component helper function' is used to check whether the string is there. Here can some nice PHP be dumped. Even before getting the item you can add some filters or get list query,if this is model list. If this is item, you'd see that there's a different set of switches is available. It adjusts to the type of query up here. [00:23:19](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m19s)
### Dynamic Get Join DB Tables
Coming back to this(Join View Tables) area. Let's again look at the database table option. I selected category and it's a single row that's returned. I called it b. I joined it left, and I set a.catid must be equal to b.id, which is the id of the category. I only want the title and the alias. That is [00:23:44](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m44s) how we set that up. Only the title in the alias and it returns that for us. Then it links it in there(see video), and that's part of what you saw here when you looked at the query option here, it's the sixth section here.
Coming back to this 'Join View Tables' area. Let's again look at the database table option. If category is selected and it's a single row that is returned. It is called 'b'. It is joined to the left, and set 'a.catid' that it should be equal to 'b.id', which is the 'id' of the category. Only a title and the alias is needed. That is [00:23:44](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m44s) how it is set up. Only the title and the alias is nessesary and it is been returned. Then it links it in there(see video), and that's part of what is seen here when viewing the query option, it is the sixth section.<<<<<<<
### Dynamic Get Filters - Where - Ordering - Globals