Updated 007 Admin Views (markdown)

Amigo 2019-05-29 12:58:25 +02:00
parent b908825fc3
commit b5bd2ae11e
1 changed files with 1 additions and 5 deletions

@ -59,11 +59,7 @@ The basic way of linking another view would be to select that view from 'Sermons
The feature that I have explained to you shows that we are busy in preachers and it is able to display the fields that are being used. The fields are linked to preachers from this column (see video), so we are using a repeatable field structure and we are able to connect the field names to this view. [00:29:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m05s)
This is how I did that. Open the admin view, which is the one we looking at. (See video.) [00:29:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m32s) Go to 'Linked Views.' There is an 'R' in the pointer as well as the word 'field.' If you are trying to connect a view from the parent, where it is stored in 'addfields' which is the database column name. [00:29:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m54s)
Now go to database, Component Builder, admin views, and if you scroll, you'd see 'addfields.' If I open that, you'd see that it stores the ID, then the list. [00:30:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m21s) There's a way in which your repeatable fields are stored by Joomla.The value that I need to look up is in field. In the repeatable field called addfields there is a field called 'field'. And it should look for the ID of the fields. So it need to look in addfields [00:30:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m51s) in the field array for the IDs, that it needs to fetch, and the way you would mapped that in the connect a linked view is you would say that this is a capital 'R' for repeatable fields basically that is the convention to to tell the system it's a repeatable field we looking in [00:31:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m14s) and inside of the repeatable field we must look in the field array for those ID's and they should mapped to the child's ID. So does that make sense I hope so. Because that's the way it's done. And if that wasn't a repeatable field but an array you would simply say array [00:31:34](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m34s) and if the array is just the values themselves you would drop off any pointer to specific value. But if it's an associative array you would just add the name of the associative key that it needs to look in. [00:32:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m00s) If it's just a normal array without association leave it like that so this would just tell the system it is a array and it needs to look inside of those values for these IDs. So that's sort of explains the linking of an admin view to another admin view. Now getting on with the setting up of fields. [00:32:28](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m28s)
This is how I did that. Open the admin view, which is the one we looking at. (See video.) [00:29:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m32s) Go to 'Linked Views.' There is an 'R' in the pointer as well as the word 'field.' If you are trying to connect a view from the parent, where it is stored in 'addfields' which is the database column name. [00:29:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m54s) Now go to database and 'componentbuilder_admin views.' You'd see 'addfields.' There it stores the ID, then the list. [00:30:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m21s) There's a way in which your repeatable fields are stored by Joomla. In the repeatable field called 'addfields,' there is a field called 'field'. It should look for the ID of the fields in addfields [00:30:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m51s) in the field array for the IDs that it need to fetch. The way you would have mapped that in the connect a linked view is you would say that this is a capital 'R' for repeatable fields basically that is the convention to to tell the system it's a repeatable field we looking in [00:31:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m14s) and inside of the repeatable field we must look in the field array for those ID's and they should mapped to the child's ID. So does that make sense I hope so. Because that's the way it's done. And if that wasn't a repeatable field but an array you would simply say array [00:31:34](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m34s) and if the array is just the values themselves you would drop off any pointer to specific value. But if it's an associative array you would just add the name of the associative key that it needs to look in. [00:32:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m00s) If it's just a normal array without association leave it like that so this would just tell the system it is a array and it needs to look inside of those values for these IDs. So that's sort of explains the linking of an admin view to another admin view. Now getting on with the setting up of fields. [00:32:28](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m28s)
**Fields**