From a959029b5e15071b61f2e4c28a2e0fe6b1f04681 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Wed, 22 May 2019 10:06:45 +0200 Subject: [PATCH] Updated 007 Admin Views (markdown) --- 007-Admin-Views.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/007-Admin-Views.md b/007-Admin-Views.md index 3c58481..6b67fe3 100644 --- a/007-Admin-Views.md +++ b/007-Admin-Views.md @@ -1,8 +1,8 @@ # ADMIN VIEWS -Hi, we are looking at admin views which is the next thing to be setting up in developing your component. First we started with field types. Looking at how to setup field types or improve on them. Then we looked at how to use those field types to build basic common fields. Now we going to look at how to take those fields and add them to admin views. [00:00:34](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m34s) Admin views like I explained in our initial GENERAL PLANNING video, it basically forms the bedrock, the basis of your components database structure so your admin views is where your database structure is being developed. [00:00:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m56s) All your admin views which have their own table, now as we explained admin views have a single name and has a list record or a plural name. Then there is a system name and the reason why there they actually have three, is that let's say you have Want to reuse this specific admin view in another component [00:01:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m21s) with the same name but obviously adapting it to that component. The idea would be that you would then have two preachers showing up in your selection list. When you added to the component and so that might be difficult to discern which is which and so you can add the name of that specific component as part of just differentiating between [00:01:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m47s) the same names. That means you can have admin views with the same names, but with different implementation. In fact that is how you can do different version control concepts on components using the same admin view. [00:02:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m03s) Just inside of it making a few changes and in saving it so you could do that open preacher for example and in here you could say free version. This is the free version and then save as copy and then you can change the field that is linked. You can change some of the linked views. [00:02:25](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m25s) You can change some of your CSS, whatever other things you have done regarding this admin view, and then go to the free version of that component and link that specific one that specific view instead of the other. Anyway maybe I'm getting ahead of myself I usually do. So let's focus on admin views. Now to create a admin view. You just click new [00:02:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m54s) I'm going to open preacher again because this is the one we are using as our illustration and you would see that there should be a name for a single record. Again that is where you would edit this records so that is in this case I said preacher and then there is a list of records and that's preachers. [00:03:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m14s) Then a short description and a normal description depending on what you would like to say. Then there is a type, now the read write, and the read only, changes the components editing view. If you say read only, then it will basically limit [00:03:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m36s) the fields to not be able to edit them. If you remember the modified by field cannot be edited because it's done automatically and when it was modified is also updated as every time you click save. So this area can not be edited and that's how all the fields are going to look. [00:04:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m02s) If you select read only if you leave it on read write, it will look like this and you will be able to edit it. So that is looking at these fields. Now there is a place for an icon if you hoover over the icon it gives you the dimensions that is needed. This basically is the icon. Then when you look [00:04:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m24s) at the dashboard, these icons are the one selected there. So you can see that the icon has two of them, one is the add icon, and one is a normal icon so if you hoover here you should see the image if it is set in [00:04:46](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m46s) your images folder. So if you open this it goes to your image folder you select the icon. When you hoover here those images are not in this image folder, so it does not show up. And then if you going to add preachers if you going to add a field just a field called category that is of the category type, [00:05:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m14s) then you should add a category icon. Since then the system will automatically know there need to be a category setup. And it will look for category icon to use for that category and if you select a category field that is a general category for the whole component which isn't directly linked to this [00:05:37](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m37s) view, then it will take the first view the system will look at which view when it processes it which view is the first one and usually that would be the first one you've created and it will use the icon in that but to be on the safe side if you using one category for them all just set the same icon on them all. But if you are going to use a category [00:06:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m02s) which is primarily focused on the preachers, and you just going to put preachers and a category then you need to add a category icon here four categories now permissional switch it got to do with your accessing and updating of data. So like you can see here we have [00:06:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m24s) view edit, view edit state, view edit own, views create, admin views delete, admin view access, admin view edit version. Now this edit if it is set if you are in this managing group and it set to allowed then you can edit it. If you are a guest and it is set to deny, [00:06:49](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m49s) and no matter where you are in the front or the back of the site, you won't be able to edit this information even if you have a direct link. It won't allow you to edit it. Now it also has view access so somebody who might be not allowed to edit it may be allowed to view [00:07:08](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m08s) this content in the back end in the list view. Then it will show in the list view and they can see that it is there. Now you might think to yourself why would I ever want to do that and you see because of your custom admin views and the way that you can connect them to your admin views, which we will look at later. You might want to display the record and [00:07:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m32s) just leave an custom admin link to the data. Let me show you an example of a component that you see here, there is a button underneath the company name. So it displays the record but [00:07:53](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m53s) if I was like Arandis Town Council whose profile is set to being locked. If I was to click on this it will tell me that I do not have the permission to edit it, but if I was to click on this icon It actually loads the information that I looking for and [00:08:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m12s) that is the difference. The differences sometimes you want to use a custom, see this is a custom admin view and you might want to do something that is not a editing view, but a custom view and then you would like to see the record but not edited so that's really what [00:08:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m36s) that is all about. We are back here and we are looking at the missions so opening this permission tab, you would see that there is view edit, view edit own, view edit state, and all these have been created usually when you open this. It might [00:09:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m00s) look like that so you would set the first one and that you would see there are two options. One is core edit and one is view edit. The core edit means that you want to do a global switch. Now [00:09:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m27s) let me try and explain that by opening Component Builders options. We haven't actually looked at this yet, but it is quite important you would see that all components in Joomla you have what is called the create edit, delete edit state, edit own, it is this list of options which means that if you select this [00:09:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m56s) you know that they can't create something then it is applicable to everything in this component because it's a global setting so everything that doesn't have a view name behind it. Like this is a view name and it says access. This is a view name and it says batch use. [00:10:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m18s) But this says only batch use. So that's the global for batch use, and this is only related to this view. So you can say I am allowing them to do a batch function, but in this admin view I don't want to allow them to do a batch function. Or you could say [00:10:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m39s) you know what, I want to use inheritance. So that means I'm going to do that I want them to be able to do batch functions here and in this view. Now the reason why you can do it in two places is that you have a global switch to stop them from doing it. But you can also locally to the view tweak whether they are able to to edit do some of these features. [00:11:08](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m08s) So coming back to the way that you would set that up. If you don't want to have a separate control for this view In relation to whether it can edit it or whether you could change it all, view it all these possibilities. [00:11:31](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m31s) Then you would use core. Core would mean that you would have only this one switch and if you say deny, it will automatically deny it for that view and any other view that is using core. Or core can be seen as global when you are setting it as edit view, it means that the system will generate [00:11:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m55s) a specific list of items specially just for that view. So if you look from there to there, that is for your admin view. From there to there, is for your custom admin View. Now that means what I set up this in a Component Builder, [00:12:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m14s) I selected view edit, and then I set it in relation to each record in relation to the whole view. And I selected both so then it will implement it for both and single record and it will implemented for your global settings. Now again it might feel [00:12:34](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m34s) I won't blame you if what I have just tried to explain makes you feel confused, but really the only way for you to make sense of this is if you know how Joomla provisional structure works. So if you are using a Joomla website, and you have actually ever gone to articles [00:12:58](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m58s) and opened options and then look at their permissions, then you'd see that they only have create, edit, delete, edit state, edit own, and then these accessing of the control and this actually this big global settings. Now what we are doing, we are simply adding [00:13:17](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m17s) more control then only these default because the way this works in article manager you basically have one view. That view is articles. These other views known as categories is another view, but it isn't really has another component it's not really content. The content component [00:13:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m38s) And admin features is just another implementation. It's not really a whole new database. The point is you only really have two well the most two views here and so when they look at options they know that if they tweak this permission they want it to be implemented for all the views related to articles. Right well with Component Builder you are able to build components. [00:14:06](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m06s) That are far bigger then the content managing article manager. I'm because of that we felt that your permissions must extend that you can target a specific view and not just all of them at once. So if you want to target a specific view you will select the view edit. [00:14:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m27s) Actually this view prefix must be in your selection. If you select core that means you are saying I don't want to specifically target this view if I change it in the global settings which would be the ones without a view name in front. [00:14:45](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m45s) Everything from here to there those are the global settings, global export, global batch, global version, edit version, global create, delete, [00:14:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m59s) Edit, edit State. Now edit state is changing it from publish to unpublish those things edit own means you might not have edit rights but he has edit own rights. So that means whatever you create can edit again in and created by is a field so can he edit created by field or can he edit create date field. Now you'd see that this basically targets fields that are sort of the default fields. [00:15:33](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m33s) There is a way to target custom fields fields that were developed outside of the default fields but that is not done in here I'll Show you where that is done this is just controlling your default fields and your default features with regards to permissions and so you would first set up these permissions. Make sure that you set up all of those that you want to implement. [00:16:01](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m01s) There is a list here of those I think is most general. This list might grow with time but because we've moved the control of a single field out of this structure it actually means that we've made it scalable so this permissional implementation here [00:16:22](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m22s) is really only targeting your or default fields or the fields that already the system put in for you and the default concepts like accessing this specific view or deleting an item in the view or creating an item or editing the created field or editing the created by field [00:16:44](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m44s) Changing the state edit own so those are the custom default features. If you want to do a control on a specific field I'll show you that in a moment but that is the implementation of permissions. If you do not really understand this I would suggest you make [00:17:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m05s) effort to study up on Joomla's own implementation of the promotional structure then once you've really understood the way Joomla handles this permissional structure then you would have better grips on setting up these permissions [00:17:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m24s) per view what is done in the code if you would like to see that it's basically in the code if your ready have developed a component. You would see that it sets up your globals. This is the global. Now when I say global I mean If you click on options [00:17:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m47s) let me just close this, if you click on this button here options in any of the components you're going to the global settings, and these permissions here are those first that I've highlighted. So if all those and they have [00:18:09](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m09s) links to the specific views so there is the field view, there is the Dynamic Get view, there is the custom admin View, and you can see that they have there related switches. But then there's also for each view their own section and that causes Joomla [00:18:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m32s) to add in an item a permissional tab with switching to control the permission for this one individual item and we have tried our very best to implement these permissions actually the way that you want might expect I can in later videos going to the code and show you exactly how this permission structure is being implemented and I think it's one of the features that makes Component Builder [00:19:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m02s) far more advanced then other Component Builders out there is the ability to add permissional structures to your component right inside of Component Builder through this permissional switch. And so we will definitely be speaking about this permissional structure as we go along the tab structure if you look at these we call them tabs [00:19:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m27s) settings fields CSS JavaScript PHP MySQL Published and permissions the publishing permissions are tabs that are built automatically for all back end admin views. [00:19:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m43s) Old admin views have this permission and well the permission only if if set and published will always be there in published we basically bundle your the fields that are built dynamically without you having to set them I think that is what you could say [00:20:09](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m09s) with publishing all those fields that you do not need to set are always placed in publishing and so everything else this MySQL tab here the PHP JavaScript CSS Fields and settings are actually an example of what tabs can be now in preacher I actually setup two tabs one called [00:20:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m32s) details and one called sermons. So there are two tabs in preachers so that means if you were to open the preacher back end view first one would be called settings the second one will be called sermons and then you'd see publishing and permission. so that's how it would look. Now when you create fields [00:20:53](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m53s) you would see that there is a column here called tab, and you then will select the number. Now the tabs are number from one to whatever. we don't start at zero or though that might have made more sense for programmers we started with one. So first tab, second tab, and because we are using [00:21:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m15s) a place different from the tabs. We don't use the names. So you need to remember that this is tab one, this is tab two. So when you set up a field you need to tell us in which tab you want to place that field. So that is what this tab number here is all about. [00:21:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m35s) Now you might say but where is tab two's information because they are sermons right. Well because of the fact that sermons is an actually a table on its own. If we go out here we will see that there is a admin view called sermon, and it has its own back end view, [00:22:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m02s) and it has its own structure. So how can I get the sermons that is only related to this preacher to be showing in the second tab called sermons? Well we created a thing called linked views. Now linked views is the place where this is done. [00:22:25](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m25s) So basically I selected sermon as the view, I said it should be placed in the second tab, and in child key, is preacher. So if I think about sermons which is the child, sermon is the child, preacher is the parent. So you would always think of the parent as this the view in which you are the moment you are setting up the linked [00:22:49](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m49s) view. So that if you are in preacher the parent is preacher, if you are in sermons, the parent is sermon. So depends on which view you are busy editing. And so here when we talk about the child key, this would be the database field name [00:23:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s) that is to be looked at, and the parent field name, that should be found inside of preachers. So when we look at preachers you would let's go back to sermon. We got sermon open here and if I open this fields, Well I don't need to open it here in fact let me use another place. [00:23:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m38s) It is easier to see. Let's go to fields you will see that there is a field called name. There is a field called preacher. This is the field that we want [00:24:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m10s) connected to with each other right. So to get the sermons that belongs to that preacher, we need to get the ID of this field. Now that is a custom field. And we said that we are going to look at custom fields only after explaining the admin views. So I'm going to go into detail now but I'm going to open that field none the less and I'm going to show you that its name is preacher. [00:24:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m35s) And because that field will be connected to sermon it means that in the database the ID which is the key field is going to be saved in preacher. So that means the ID of the preacher is saved inside of the preacher column, in the database. [00:24:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m55s) Now let me show you that in the database itself, so here in the database with sermon distributor and I'm opening sermons and you would see that we would scroll until we see preacher. And it has ID's in it and those are the IDs of the preacher's themselves. So if I was to go to preacher, it basically means that we are linking [00:25:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m24s) to this ID here. So going back to our linked view concept, that means the child database table, in which the ID of this preacher must be found is in preacher. [00:25:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m43s) The parent key would be this preachers ID and so by doing that, the linked view will only show the sermons that are related to this specific preacher. And that is how the linked views can be linked. If you didn't select these correctly, it won't load all of them [00:26:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m05s) It won't work well. So there needs to be that tight relationship between the parent and the child view. So there is also a way to actually link from an array so let's say [00:26:23](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m23s) the person is able to select more than one preacher, there is a way for you to also type that, but that would all be dealt with in advanced concepts. I could explain some of it here but let me show you that would be one of the syntax(>) to use [00:26:48](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m48s) But like I said I think possibly I need to deal with this in advanced concepts because who will know to look for the answer in this video or tutorial. So we'll stay with the basics here. So the basic way of linking another view would be to select that view from this drop down. Then say in which tab it should display. Then [00:27:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m12s) what is the child database table in which to look, what is the parents value to use to build a relationship. And then this add new button yes or no, is basically when you look at fields here, you see it has a 'new' button. [00:27:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m38s) So you can in that switch (add new button) decide whether it should show it or not. I should tell you that if you say yes and you have in that view created the correct permissional of structure for whether somebody can create an item you can control the display of that 'new" button [00:28:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m02s) with just setting the permission of that users specific group. So if that user isn't in a group that doesn't have permissions to create new items, for in this example, for preachers or for sermons, then that 'new' button will also not show up. So we have that permissional wrapped around that button's display methods. [00:28:26](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m26s) That is the tabs just looking at the tabs. That's really what we were looking at and then explaining to you how to link other views to it and to other views so that you can have the data displayed inside of each other. [00:28:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m43s) Basically this feature we have here so the fact that we are busy in preachers and we are able to display the fields that are being used. As you can imagine these fields are linked to preachers from this column here, so we are using a repeatable field structure [00:29:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m05s) and we are able to connect the field names to this view. Now let me show you how I did that. So I'm going to open the admin view which is the one we looking at. [00:29:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m32s) I'm going to link views and you see that I have there a 'R' in the pointer and the word field so if you are trying to connect a view from the parent. And in the parent it is stored in 'addfields' that is the database [00:29:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m54s) column name. So if we go to the database, go to Component Builder, admin views and we scroll, you would see there is addfields and if I open that you see that the way it stores it. It stores the ID, then it stores the list. [00:30:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m21s) So there's a way in which your repeatable fields are stored by Joomla. and the value that I need to look up is in field. So 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) Now since we've already created the fields beforehand you will usually start out this way. It will look like that and the fields that you have created you would scroll down if it is a long list you just start with typing that fields name and it will sort of bringing it up to you. Then it ask you whether you [00:32:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s) would like to show this field in the admin view. In the admin list view and that means if you've closed your editing area there is a list of names here and if you want that specific field to show up in this list then you would select 'show'. [00:33:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m18s) If you have selected 'show' you could tell us in which order you want this. Must it be the first one, second one, and we thought well you shouldn't do more than a 100, it will look ridiculous. So you can say I want this one to show up first. Now the title in alias concept in Joomla is quite interesting [00:33:41](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m41s) It's actually needed especially if you want to do history control or integration with Joomla's infrastructure when it comes to their history and tagging systems. You need to add a title and an alias to all your views [00:33:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m59s) especially if it is a view that is going to be used in the front. So in this case since we are going to use preachers in the front to display list of preachers, we most certainly going to add a title, and we are going to use the name as the title. Then again back to the back end. Do we want to have this 'sortable', do we want this thing to be clickable there, so you can click on it, and it sorts the table alphabetically [00:34:30](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m30s) on the basis of this column. So if you want to have it 'sortable' then do you want to have this field be searchable. Do you want someone to type into this box? We take 'warehouse' for example, type it in there and search. Do you want it to [00:34:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m51s) show only that specific field. So if you want them to be able to search for it you, say yes. Then the filter option is a tricky one. You don't want to set name to filtering because then it will show a list of all the names that already is being shown in the table. You only want to use filter on things that are like a radio box or a [00:35:19](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m19s) other view or you know fields that actually are not all being displayed one after the other in the table. So for our example I added, let's go to sermon distributor and preacher. I added no extra fields there, but at sermons I added preacher. So there's a list of all the preachers here so I could sift and say ok I don't want to see this preachers sermons and then it shows up only those, so that is the filters and the way that you set up the filter is simply by clicking yes or no here and it will set up that filter for you. Then this link if you are setting up a custom field and you want to be able to [00:36:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m12s) in the display of the list have it clickable so I can click here and actually go to that preacher. And then click close and then I'm back in the sermons list view. I could also click on series and it will take me to the series, and I can edit the series immediately. And click close and take me back to the list view. So if you want that feature for the specific item then you need to tick yes here. Now usually we used the name as you see here to be the clickable title, if you select your title here and you click link then your actually telling us that this field item here is actually what we should use as the clickable option to open that actual sermon. So here we'll have that actual sermon opening up and all it's related fields. [00:37:16](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m16s) So that is the way for us to know which field should be used as the clickable field if you have a title. Now this concept is something that you might need to play with and since it's so easy to change it you can just click a button here to compile your component, install it, look at its behavior, change it a little, compile it, install it. Look at its behavior by doing that you would get a good understanding of what happens if you change these switches here. Now we said that we wanted the preachers name and stuff on the settings and our tab for settings as the first tab. Now we going to look at the back end setup in Of where you want to have this fields display. There are these different placing options left in tab, right in tab, full width in tab, above tab, underneath tabs, left of tabs, right of tabs, and then [00:38:20](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m20s) there is the order in which it should go. That means if we look at this again this is left in tab(left side of the screen), this is right in tab(right side of the screen), I think I have another view that goes beyond some of those parameters. Let me go to this one and we do question. So that is right of tab, not in tab, you see there is an option it says; right in tab, left in tab, and then it says left of tabs, and right of tabs. That means that you can put it out side of the tab area. So even if I was to click here it will remain displayed right there on the side and that is to put it right of tab. There's also a left of tab area over here. [00:39:31](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h39m31s) Then a above tab is this one here, that's above the tabs. So it also shows all the time and and then there's underneath tab. We basically added the option of placing data. I will just show you. At the right in tab, left in tab and then right of tab and left of tab and above tab and beneath tab which is 1, 2, 3, 4, 5, 6, positions in the back end of your template. And the places are being set simply by these alignment assignments here (select the field alignment inside the tabview) and you select these(from a list) and then once you've selected them let's say you've selected this one above tab and you selected 1 then this is the order in which you wanted to display. First this one, [00:40:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m35s) then that one, left in tab. This is first, right in tab, this one is first, and then that one, and full width, it is a description. Now full width will always display under the left and right of in tab. So you need to select your left and right and then only your full width. Full width is always the last thing to show up in a tab, and then here is the switch to add permissions to a specific values. So if I was to say you know what, I want the control, which group can edit the name field, you simply need to click this yes, and that would add this field into the permissional structure dynamically. That is how you you control the permissions of fields. That is how you add fields to a view and those are all the different switches. You can only have one title per view and only have one [00:41:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m39s) alias per view. You should not have more than one selected. In any case I think the system will ignore the others but just to be safe set the others to no. And then those that are actually the title to yes, and the one that's actually the alias, to yes. And so we will be able to be sure to use the correct field values. And then when you set any of these to show, you should set the order of their display here, and there is the filter. The filter then is added dynamically by simply clicking a yes here. If we go to sermons as an example, and we click on their fields they have many more fields which will help to illustrate some of these things. And you'd see that we have sermon series and we have it set up as a filter. Filter is the second last column. [00:42:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m43s) Sermons series, let's see we set that to yes, so that means we can sort this sermons by series that is how you set the filters for the back end. Remember this is primarily for the back end. Although some of that information will relate to the front eventually, especially this permissional switch will be able to access it from the front if you need to. But this is simply to add the fields to the actual view in the back end. If you have any questions about this please give me a heads up if you feel like I haven't done a good enough job explaining this, then let me know and I'll redo this video. So that's adding fields to the admin views. There are much more things to explain here and I think the only thing I'll still cover in this tutorial is the actual conditions this is an amazing feature [00:43:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m47s) which goes beyond Joomla's control on the show on attribute per field. Remember we looked at the show on attribute and the show on attribute can control which fields to show when you are clicking on other fields. For example here we have a field called add JavaScript. If I click yes it opens this area Java Script where I can add custom scripting. Now that behavior is being controlled by this condition structure. The condition structure for sermons are the following; if you can see there is a few already being set. So what we will do, we will first decide which field are we targeting. Which field do we want to show or hide. That is the behavior. Do you want to show a field or hide a field? Now most of the [00:44:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m51s) time we'll use show. Show means it will be hidden unless these criteria's are met. Show is the one I use the most and I think most will use that mostly. Here is the list of all the fields in your system. You might say, why don't you just show the fields that I've selected as part of this view and unfortunately that feature isn't in place yet. So you need to remember which fields you selected in the fields area. And for our purposes it is these fields and you need to remember their names. Then when you go to the conditions, when you type a field like name, you need to know it is this one. That is how you would link to them. I've build on option, files is a field and I wanted to show. Now this isolate and chain function is a concept which I believe would [00:45:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m55s) be best explained when you think about that not only one field must be used to show the other one but more than one field. So in this case Dropbox auto note in sermons should not only show when fields source is Dropbox, but also when built option is automatic. So that both of these should be true before it shows the Dropbox note. And so you would select the field you want to control, obviously you can control more than one at a time, but the logic behind this might not always work so you need to try it, test it, if it doesn't work come and tweak this until you you find it working in behaving the way you expect. So most of the times [00:46:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m59s) you would only link one field to one validation. But as soon as you have multiple fields, you would use the chain option. So it's either isolate like this one. The build option of files should show when file source is Dropbox. Then it's isolated, it isn't connected to any of the other settings here. As soon as you click chain, it means any other field that has this row, this is a row, that has this field selected as well will be chained together. So that it must be both being validated as true before. It actually will show the field. So let's look at it. It says file source and you can select any of these if you know that this file source is a list. Then you can look at list and see the list options. This is only for text, and it says that, only 4 text_field, only 4 text_field, [00:48:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m03s) only 4 text_fields, only 4 text_fields. This is only for list and radio and check boxes and dynamic lists. This is only for list radio and check boxes, this is only for list radio, and check boxes. Then you can say 'is' or 'is not' So if it 'is' Dropbox, then it should show, if it 'is not' Dropbox then it should show. That is the the logic behind it. Now here this one(any selection) is when you're dealing with a dynamic list. Unfortunately with dynamic list it's quite difficult to set these values since they are dynamic. And so the best way to deal with a dynamic, would possibly be to leave this blank. So that means that if any of the values are selected show this item. We will still look at dynamic list or custom fields [00:49:07](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h49m07s) and we will explain to you how to set up those custom fields. That is basically what that option is for. Most of the time we are using this 'Is' and when you select that specific field, let me show you if I select file source. If the field that you've selected is a text field, the system will show you that by saying keywords or length. So you can say I want if he has put in a length of '2' characters then show. Then you take keywords away. So then that is how you can use the text field. Now you would change this to [00:50:11](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h50m11s) 'Active', that is active and that it has a length of '2'. That's how that would mean if you know that what you've selected is a list, it will show you the list but it show you all the values and then you can remove the values that you don't want to use. And the only value that's really important is that 2 the other is just for you. So you could just leave 2. That will be the same as that we are just showing you. In fact what I do is I explode the string at the pipe and I only use the first value to develop the JavaScript. In fact the Java Script that is being written. We are in the sermons view, let me show you that, so we would go to Component Builder, admin, components, sermon distributor, modules, [00:51:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h51m15s) forms, and then you'd see there are two, there's a XML which is the fields and then there is a js which is actually the Java Script. So we open that and here's all the JavaScript that component Builder would build. Now if we look at this let's go there it's only these are the conditions. So these are the conditions it's not even that long of a list, but to implement these conditions component builder builds this JavaScript so it starts up here and all of this JavaScript is the implementation of those things that we set there all the way down to there. So that means about 500 lines of JavaScript gets written by component builder just by these switches [00:52:19](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h52m19s) that you set up here. Now I'm showing you where the script is being written so did once you've set up these switches you can come into this script and if you remember the field name that you are working with so for example let's look at it, build option is the field and files source. So let's look if we can find that here. There is source so it gets the value when the page is ready it checks the jform on this called source what is the value and it puts it in here and our first function obviously I'm using a random function name generator as you can see and it's start with V and the next one would be VW and so on and so on and [00:53:23](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h53m23s) So that means you need to now how we implement this function hiding and showing of the source. You would search for the V function by just adding a bracket there and search ok so it's the first function. And I'm basically saying, is it set? if it's set, then I add a source constructor and if it's an array, is this an array? checking the value whether it's an array. If it's not an array I put it into a temporary array. There we push it into the temporal array. And if it is an array and it isn't set we just create a blank array. Then we do a validation here and again this you can go check. [00:54:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h54m27s) So basically the function is that one(source_vvvvvvv_somefunc). So let's check that function and all that function does is it checks, is it 2? If it's 2, it returns true, if it's not 2 it returns false. So you see it's quite simple and the value whether true or false is returned to source. We put source into if it is true then we close that view. Sorry we get the closest class called control group. And we check, is this field required? If it's required and these are some home works that we do. Now if it's false then we hide it, and if it's required we do some house cleaning so that is simply a quick looking at the code which is being generated just by this one switch. [00:55:31](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h55m31s) This is not the only code there is another place and that is in the view itself. We are looking at sermon then template and edit and then from around here we have JavaScript again. And again of a we have on keyup for source or on change, because the system doesn't know, is this a text field or is this a list field or what is it? So we have these two check function on it and also there is another place where source is going to be used for another functions. We just focusing on this one and so it gets the value and it runs that function which is in our JavaScript file. So here's the JavaScript file, there is the function. So it's reusing the same function. [00:56:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h56m35s) The moment that there is a keyup or a change on that specific field. That is what I've done. Obviously other developers who are more advanced in JavaScript than I am, get's involved I could show them where in component builder the script is being generated and we can improve this dramatically. I am not that good at JavaScript and in fact I feel like most probably a little bit resource-intensive here but this is the best I could do so far and obviously if we can improve it and if you know how to improve this then you welcome to get involved on GitHub and start with a discussion on improving this infrastructure. I can tell you that this infrastructure is done in the compiler of course and I can show you exactly on which line this was developed. In fact all you need to do is when you compile your component just if we [00:57:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h57m39s) go back to components. Here we're inside a component. All you need to do to know where that is being built it's just tick this to yes and then it will add in the comments it will add a line reference of where that specific script is being build. Let's go back to the admin views. We're not really finished, so this is structure that you can use to actually manipulate the conditions upon which field should show or not show. and I really think we have done a very good implementation here. It gives you so much possibilities of structuring and chaining and working with fields in its relationships if you want to not use this and just use the on show then that is also going to work just as well in fact I think it will work better. The only problem with the on [00:58:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h58m43s) show, is that it doesn't actually provide the ability to target as a text field like we have here. Where you can add a keyword and say OK if they types in 'his' for example, then immediately this other field will show up which is an excellent feature. I mean I don't think you can get that kind of intricacy with show on option and furthermore it cannot look at multiple other fields if they have certain values and if it evaluates true then only show the other field. Those kind of controls are not yet available in the show on implementation as far as I know, and yes I possibly would like to get involved on the get repo of Joomla and see if we can add these nice features. But for now we have add them to Component Builder. In component builder you can implement these(match options) and we are writing the JavaScript to manage this [00:59:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h59m47s) for you. That is your conditions for fields. We've looked at all of these(permissions, tabs, fields, conditions and linked views). The next one is basically the list of the fields that you have already selected and clicked save. It will show a list of all the fields that you've selected. Again any of those fields, if you want to update them, you could just click on the field name and it will take you to the field and you can update it. The next tab is a place for you to add custom CSS that is just related to this specific view. You can add CSS here, which is for the edit view or the single view and you can add CSS here, which is for the list view or the multiple views (plural). Then it will be placed in its prospective places. The same goes with the JavaScript, accept that you have four places to target instead of just one. If you remember when we looked at the way that we are [01:00:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h00m51s) building the JavaScript there is a file, a JavaScript file, which just has JavaScript for the view and then there is the footer area which is under the HTML and PHP at the end of the file there is a whole area which is just JavaScript at the footer of the file. And so we decided to add the option of adding JavaScript to the file or JavaScript to the footer. (The view file or the view footer or views file or views footer). So it just gives you the option of targeting. If you know list and this script can run as a function and I just wanted to be able to be on the page. Then you add it to the file and then if you want to use the function you can add it to the footer. That it's up to you. Then there is a PHP area and here you have the option of adding JavaScript to your editing view [01:01:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h01m55s) primarily. If we look at editing views, the moment you click on add JavaScript, it opens a tab and now the way that we want to implement ajax is primarily via the controller and method implementation. So if I explain that to you the component has a controller called ajax.json.php, you can open that. Then it has a model we call it ajax. So you have a controller and you have a model. Now the controller is like the gatekeeper. He first does a few checks and balances to ensure that the data is Correct that that the token is right that if you have set this to be [01:02:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h02m59s) validating whether he is a user, then it also checks that there's a user ID. If you have set it that it doesn't require them to be a user it basically would drop off this validation. I will show you that in a moment so that you can follow me. There is a controller area and then there is some model area. The model is basically a place where you can write a method which is queried from the controller. So you can see in the controller it basically gets the ajax model, and then it is querying a method in that model called Dropbox. Here we are querying the Dropbox method and it's getting the view name. I'm not [01:04:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h04m03s) using this variable but it is here and I possibly will use it later if it becomes necessary so I'm basically just activating this method to run and when this method runs it triggers some global methods to run and on the return of that value it triggers another local method so again I'm not trying to teach you php here. All I want to show you is that this part of the code was custom written. If we go back to our component you'd see that there is that code. So when you click on ajax you add that name basically writing a method make sure that it's set to public and your write your method in here and in the ajax input, you would say the task name is check dropbox listing. The values I want to pass it is view and [01:05:07](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h05m07s) type. And both of them are integers and it needs to run the view, needs to run a dropbox method. And the type needs to run an update dropbox. And both of them should check whether it is a user. So only users can fire these back end methods and the you can see that you have control to tick that. The filters are the same as with any field that you can select. [01:05:45](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h05m45s) And so integer here would be fine and if there's no value you set null. This task name is what you be using in your JavaScript. So I first wanted to show you the PhP side and then the task name itself. Let's just make sure I do not miscommunicate here. The method name is set here and that should correspond [01:06:07](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h06m07s) to the method that you set up in your php Ajax method. Which is possibly the method in which you model the data, get the data, structure the data, and give it back to the Ajax call. So you return the data inside of this method, but in your JavaScript you will be using the task name to [01:06:29](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h06m29s) get to the system. So if we go to the JavaScript, close out, go JavaScript. It seems I used the JavaScript example which is going to get way ahead of us but since we started let me not leave you in mid air. So I have to close out here. [01:07:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h07m00s) In sermon distributor which is the component to which that view belongs is a place called scripts and I have added a feature which is called chronic global [01:07:23](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h07m23s) events. So I have added a feature to add global events. Now global events or the way I am implementing it, is simply an event that should run every time a page opens. Anytime any page in the system opens, I wanted it to run the global event. Now the way I target it is, I say load Dropbox Ajax [01:07:50](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h07m50s) is a global event and it needs to do that. And the Dropbox Ajax is basically set up in the helper class. So I have a helper class which is called load Dropbox Ajax and it gets the document object. [01:08:11](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h08m11s) It takes the document object it adds a script declaration to it and here is the JavaScript that it is adding. And you see, in that, it is using check Dropbox listing as the task. So it's targeting the ajax [01:08:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h08m32s) controller and asking for check Dropbox listing as the task and it's passing to it a token and a view name. So possibly we would like to use that view ID later to log from which area this automated [01:08:52](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h08m52s) feature mostly gets triggered. I'm not doing that as yet so this is just what the script will do. So there is jQuery which only fires of after the page is loaded. And at the moment it's just adding a dummy 3 in there to just trigger the method. [01:09:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h09m10s) And so that is really how this script ends up on the page. I'm sorry that I used that as an example I realise it's a little bit ahead of ourselves, but nonetheless I want to not leave it at a loose end. So I am redoing it actually for you. [01:09:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h09m32s) That is where this php script are going to be used. So since I need to add this somewhere I just selected a view to advantage it to this sermon view. And I added the ajax controller concepts here, but the actual JavaScript that fires off all this, is set to the global event and that means every time a back end area is opened in this component, [01:10:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h10m00s) it loads that JavaScript to the view. And JavaScript executes a ajax request which starts updating the Dropbox listing. I'm not going explain all of that Dropbox listing to you now, it's a quite an advance concept but it's basically sermon distributor that is able to link to a media inside of a shared Dropbox folder. And this whole method here that we looking at [01:10:28](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h10m28s) parses that Dropbox folder every so often to make sure that it's to date. That's what it's all about. So that is just looking at adding ajax. Here you can see that if you know the Joomla API, you know that it has a (getitem method) [01:10:45](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h10m45s), it has a (getitems method) in the model. In the model there's a (getitem method) in the editing model. In the list model there is a (getitems method). Then there's a (getlistquery) in the (jmodellist). And there is a (safe method), there's a (postsafe method) in the controller. There is (allowedit method). -[01:11:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h11m10s) There's a (batchcopy method). There's a (batchmove method). There's a (script before delete) method. There's a (script after delete). And these are all PHP places in which you can dump custom scripting. So if you want in the safe method, [01:11:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h11m32s) you need to know where the safe method is, so if I would open sermon here, scroll down to the get item. So you can add custom scripting to the get item method. [01:12:06](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h12m06s) +Hi, we are looking at admin views which is the next thing to be setting up in developing your component. First we started with field types. Looking at how to setup field types or improve on them. Then we looked at how to use those field types to build basic common fields. Now we going to look at how to take those fields and add them to admin views. [00:00:34](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m34s) Admin views like I explained in our initial GENERAL PLANNING video, it basically forms the bedrock, the basis of your components database structure so your admin views is where your database structure is being developed. [00:00:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m56s) All your admin views which have their own table, now as we explained admin views have a single name and has a list record or a plural name. Then there is a system name and the reason why there they actually have three, is that let's say you have Want to reuse this specific admin view in another component [00:01:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m21s) with the same name but obviously adapting it to that component. The idea would be that you would then have two preachers showing up in your selection list. When you added to the component and so that might be difficult to discern which is which and so you can add the name of that specific component as part of just differentiating between [00:01:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m47s) the same names. That means you can have admin views with the same names, but with different implementation. In fact that is how you can do different version control concepts on components using the same admin view. [00:02:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m03s) Just inside of it making a few changes and in saving it so you could do that open preacher for example and in here you could say free version. This is the free version and then save as copy and then you can change the field that is linked. You can change some of the linked views. [00:02:25](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m25s) You can change some of your CSS, whatever other things you have done regarding this admin view, and then go to the free version of that component and link that specific one that specific view instead of the other. Anyway maybe I'm getting ahead of myself I usually do. So let's focus on admin views. Now to create a admin view. You just click new [00:02:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m54s) I'm going to open preacher again because this is the one we are using as our illustration and you would see that there should be a name for a single record. Again that is where you would edit this records so that is in this case I said preacher and then there is a list of records and that's preachers. [00:03:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m14s) Then a short description and a normal description depending on what you would like to say. Then there is a type, now the read write, and the read only, changes the components editing view. If you say read only, then it will basically limit [00:03:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m36s) the fields to not be able to edit them. If you remember the modified by field cannot be edited because it's done automatically and when it was modified is also updated as every time you click save. So this area can not be edited and that's how all the fields are going to look. [00:04:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m02s) If you select read only if you leave it on read write, it will look like this and you will be able to edit it. So that is looking at these fields. Now there is a place for an icon if you hoover over the icon it gives you the dimensions that is needed. This basically is the icon. Then when you look [00:04:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m24s) at the dashboard, these icons are the one selected there. So you can see that the icon has two of them, one is the add icon, and one is a normal icon so if you hoover here you should see the image if it is set in [00:04:46](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m46s) your images folder. So if you open this it goes to your image folder you select the icon. When you hoover here those images are not in this image folder, so it does not show up. And then if you going to add preachers if you going to add a field just a field called category that is of the category type, [00:05:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m14s) then you should add a category icon. Since then the system will automatically know there need to be a category setup. And it will look for category icon to use for that category and if you select a category field that is a general category for the whole component which isn't directly linked to this [00:05:37](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m37s) view, then it will take the first view the system will look at which view when it processes it which view is the first one and usually that would be the first one you've created and it will use the icon in that but to be on the safe side if you using one category for them all just set the same icon on them all. But if you are going to use a category [00:06:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m02s) which is primarily focused on the preachers, and you just going to put preachers and a category then you need to add a category icon here four categories now permissional switch it got to do with your accessing and updating of data. So like you can see here we have [00:06:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m24s) view edit, view edit state, view edit own, views create, admin views delete, admin view access, admin view edit version. Now this edit if it is set if you are in this managing group and it set to allowed then you can edit it. If you are a guest and it is set to deny, [00:06:49](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m49s) and no matter where you are in the front or the back of the site, you won't be able to edit this information even if you have a direct link. It won't allow you to edit it. Now it also has view access so somebody who might be not allowed to edit it may be allowed to view [00:07:08](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m08s) this content in the back end in the list view. Then it will show in the list view and they can see that it is there. Now you might think to yourself why would I ever want to do that and you see because of your custom admin views and the way that you can connect them to your admin views, which we will look at later. You might want to display the record and [00:07:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m32s) just leave an custom admin link to the data. Let me show you an example of a component that you see here, there is a button underneath the company name. So it displays the record but [00:07:53](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m53s) if I was like Arandis Town Council whose profile is set to being locked. If I was to click on this it will tell me that I do not have the permission to edit it, but if I was to click on this icon It actually loads the information that I looking for and [00:08:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m12s) that is the difference. The differences sometimes you want to use a custom, see this is a custom admin view and you might want to do something that is not a editing view, but a custom view and then you would like to see the record but not edited so that's really what [00:08:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m36s) that is all about. We are back here and we are looking at the missions so opening this permission tab, you would see that there is view edit, view edit own, view edit state, and all these have been created usually when you open this. It might [00:09:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m00s) look like that so you would set the first one and that you would see there are two options. One is core edit and one is view edit. The core edit means that you want to do a global switch. Now [00:09:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m27s) let me try and explain that by opening Component Builders options. We haven't actually looked at this yet, but it is quite important you would see that all components in Joomla you have what is called the create edit, delete edit state, edit own, it is this list of options which means that if you select this [00:09:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m56s) you know that they can't create something then it is applicable to everything in this component because it's a global setting so everything that doesn't have a view name behind it. Like this is a view name and it says access. This is a view name and it says batch use. [00:10:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m18s) But this says only batch use. So that's the global for batch use, and this is only related to this view. So you can say I am allowing them to do a batch function, but in this admin view I don't want to allow them to do a batch function. Or you could say [00:10:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m39s) you know what, I want to use inheritance. So that means I'm going to do that I want them to be able to do batch functions here and in this view. Now the reason why you can do it in two places is that you have a global switch to stop them from doing it. But you can also locally to the view tweak whether they are able to to edit do some of these features. [00:11:08](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m08s) So coming back to the way that you would set that up. If you don't want to have a separate control for this view In relation to whether it can edit it or whether you could change it all, view it all these possibilities. [00:11:31](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m31s) Then you would use core. Core would mean that you would have only this one switch and if you say deny, it will automatically deny it for that view and any other view that is using core. Or core can be seen as global when you are setting it as edit view, it means that the system will generate [00:11:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m55s) a specific list of items specially just for that view. So if you look from there to there, that is for your admin view. From there to there, is for your custom admin View. Now that means what I set up this in a Component Builder, [00:12:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m14s) I selected view edit, and then I set it in relation to each record in relation to the whole view. And I selected both so then it will implement it for both and single record and it will implemented for your global settings. Now again it might feel [00:12:34](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m34s) I won't blame you if what I have just tried to explain makes you feel confused, but really the only way for you to make sense of this is if you know how Joomla provisional structure works. So if you are using a Joomla website, and you have actually ever gone to articles [00:12:58](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m58s) and opened options and then look at their permissions, then you'd see that they only have create, edit, delete, edit state, edit own, and then these accessing of the control and this actually this big global settings. Now what we are doing, we are simply adding [00:13:17](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m17s) more control then only these default because the way this works in article manager you basically have one view. That view is articles. These other views known as categories is another view, but it isn't really has another component it's not really content. The content component [00:13:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m38s) And admin features is just another implementation. It's not really a whole new database. The point is you only really have two well the most two views here and so when they look at options they know that if they tweak this permission they want it to be implemented for all the views related to articles. Right well with Component Builder you are able to build components. [00:14:06](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m06s) That are far bigger then the content managing article manager. I'm because of that we felt that your permissions must extend that you can target a specific view and not just all of them at once. So if you want to target a specific view you will select the view edit. [00:14:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m27s) Actually this view prefix must be in your selection. If you select core that means you are saying I don't want to specifically target this view if I change it in the global settings which would be the ones without a view name in front. [00:14:45](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m45s) Everything from here to there those are the global settings, global export, global batch, global version, edit version, global create, delete, [00:14:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m59s) Edit, edit State. Now edit state is changing it from publish to unpublish those things edit own means you might not have edit rights but he has edit own rights. So that means whatever you create can edit again in and created by is a field so can he edit created by field or can he edit create date field. Now you'd see that this basically targets fields that are sort of the default fields. [00:15:33](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m33s) There is a way to target custom fields fields that were developed outside of the default fields but that is not done in here I'll Show you where that is done this is just controlling your default fields and your default features with regards to permissions and so you would first set up these permissions. Make sure that you set up all of those that you want to implement. [00:16:01](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m01s) There is a list here of those I think is most general. This list might grow with time but because we've moved the control of a single field out of this structure it actually means that we've made it scalable so this permissional implementation here [00:16:22](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m22s) is really only targeting your or default fields or the fields that already the system put in for you and the default concepts like accessing this specific view or deleting an item in the view or creating an item or editing the created field or editing the created by field [00:16:44](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m44s) Changing the state edit own so those are the custom default features. If you want to do a control on a specific field I'll show you that in a moment but that is the implementation of permissions. If you do not really understand this I would suggest you make [00:17:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m05s) effort to study up on Joomla's own implementation of the promotional structure then once you've really understood the way Joomla handles this permissional structure then you would have better grips on setting up these permissions [00:17:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m24s) per view what is done in the code if you would like to see that it's basically in the code if your ready have developed a component. You would see that it sets up your globals. This is the global. Now when I say global I mean If you click on options [00:17:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m47s) let me just close this, if you click on this button here options in any of the components you're going to the global settings, and these permissions here are those first that I've highlighted. So if all those and they have [00:18:09](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m09s) links to the specific views so there is the field view, there is the Dynamic Get view, there is the custom admin View, and you can see that they have there related switches. But then there's also for each view their own section and that causes Joomla [00:18:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m32s) to add in an item a permissional tab with switching to control the permission for this one individual item and we have tried our very best to implement these permissions actually the way that you want might expect I can in later videos going to the code and show you exactly how this permission structure is being implemented and I think it's one of the features that makes Component Builder [00:19:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m02s) far more advanced then other Component Builders out there is the ability to add permissional structures to your component right inside of Component Builder through this permissional switch. And so we will definitely be speaking about this permissional structure as we go along the tab structure if you look at these we call them tabs [00:19:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m27s) settings fields CSS JavaScript PHP MySQL Published and permissions the publishing permissions are tabs that are built automatically for all back end admin views. [00:19:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m43s) Old admin views have this permission and well the permission only if if set and published will always be there in published we basically bundle your the fields that are built dynamically without you having to set them I think that is what you could say [00:20:09](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m09s) with publishing all those fields that you do not need to set are always placed in publishing and so everything else this MySQL tab here the PHP JavaScript CSS Fields and settings are actually an example of what tabs can be now in preacher I actually setup two tabs one called [00:20:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m32s) details and one called sermons. So there are two tabs in preachers so that means if you were to open the preacher back end view first one would be called settings the second one will be called sermons and then you'd see publishing and permission. so that's how it would look. Now when you create fields [00:20:53](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m53s) you would see that there is a column here called tab, and you then will select the number. Now the tabs are number from one to whatever. we don't start at zero or though that might have made more sense for programmers we started with one. So first tab, second tab, and because we are using [00:21:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m15s) a place different from the tabs. We don't use the names. So you need to remember that this is tab one, this is tab two. So when you set up a field you need to tell us in which tab you want to place that field. So that is what this tab number here is all about. [00:21:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m35s) Now you might say but where is tab two's information because they are sermons right. Well because of the fact that sermons is an actually a table on its own. If we go out here we will see that there is a admin view called sermon, and it has its own back end view, [00:22:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m02s) and it has its own structure. So how can I get the sermons that is only related to this preacher to be showing in the second tab called sermons? Well we created a thing called linked views. Now linked views is the place where this is done. [00:22:25](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m25s) So basically I selected sermon as the view, I said it should be placed in the second tab, and in child key, is preacher. So if I think about sermons which is the child, sermon is the child, preacher is the parent. So you would always think of the parent as this the view in which you are the moment you are setting up the linked [00:22:49](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m49s) view. So that if you are in preacher the parent is preacher, if you are in sermons, the parent is sermon. So depends on which view you are busy editing. And so here when we talk about the child key, this would be the database field name [00:23:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s) that is to be looked at, and the parent field name, that should be found inside of preachers. So when we look at preachers you would let's go back to sermon. We got sermon open here and if I open this fields, Well I don't need to open it here in fact let me use another place. [00:23:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m38s) It is easier to see. Let's go to fields you will see that there is a field called name. There is a field called preacher. This is the field that we want [00:24:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m10s) connected to with each other right. So to get the sermons that belongs to that preacher, we need to get the ID of this field. Now that is a custom field. And we said that we are going to look at custom fields only after explaining the admin views. So I'm going to go into detail now but I'm going to open that field none the less and I'm going to show you that its name is preacher. [00:24:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m35s) And because that field will be connected to sermon it means that in the database the ID which is the key field is going to be saved in preacher. So that means the ID of the preacher is saved inside of the preacher column, in the database. [00:24:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m55s) Now let me show you that in the database itself, so here in the database with sermon distributor and I'm opening sermons and you would see that we would scroll until we see preacher. And it has ID's in it and those are the IDs of the preacher's themselves. So if I was to go to preacher, it basically means that we are linking [00:25:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m24s) to this ID here. So going back to our linked view concept, that means the child database table, in which the ID of this preacher must be found is in preacher. [00:25:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m43s) The parent key would be this preachers ID and so by doing that, the linked view will only show the sermons that are related to this specific preacher. And that is how the linked views can be linked. If you didn't select these correctly, it won't load all of them [00:26:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m05s) It won't work well. So there needs to be that tight relationship between the parent and the child view. So there is also a way to actually link from an array so let's say [00:26:23](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m23s) the person is able to select more than one preacher, there is a way for you to also type that, but that would all be dealt with in advanced concepts. I could explain some of it here but let me show you that would be one of the syntax(>) to use [00:26:48](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m48s) But like I said I think possibly I need to deal with this in advanced concepts because who will know to look for the answer in this video or tutorial. So we'll stay with the basics here. So the basic way of linking another view would be to select that view from this drop down. Then say in which tab it should display. Then [00:27:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m12s) what is the child database table in which to look, what is the parents value to use to build a relationship. And then this add new button yes or no, is basically when you look at fields here, you see it has a 'new' button. [00:27:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m38s) So you can in that switch (add new button) decide whether it should show it or not. I should tell you that if you say yes and you have in that view created the correct permissional of structure for whether somebody can create an item you can control the display of that 'new" button [00:28:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m02s) with just setting the permission of that users specific group. So if that user isn't in a group that doesn't have permissions to create new items, for in this example, for preachers or for sermons, then that 'new' button will also not show up. So we have that permissional wrapped around that button's display methods. [00:28:26](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m26s) That is the tabs just looking at the tabs. That's really what we were looking at and then explaining to you how to link other views to it and to other views so that you can have the data displayed inside of each other. [00:28:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m43s) Basically this feature we have here so the fact that we are busy in preachers and we are able to display the fields that are being used. As you can imagine these fields are linked to preachers from this column here, so we are using a repeatable field structure [00:29:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m05s) and we are able to connect the field names to this view. Now let me show you how I did that. So I'm going to open the admin view which is the one we looking at. [00:29:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m32s) I'm going to link views and you see that I have there a 'R' in the pointer and the word field so if you are trying to connect a view from the parent. And in the parent it is stored in 'addfields' that is the database [00:29:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m54s) column name. So if we go to the database, go to Component Builder, admin views and we scroll, you would see there is addfields and if I open that you see that the way it stores it. It stores the ID, then it stores the list. [00:30:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m21s) So there's a way in which your repeatable fields are stored by Joomla. and the value that I need to look up is in field. So 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) Now since we've already created the fields beforehand you will usually start out this way. It will look like that and the fields that you have created you would scroll down if it is a long list you just start with typing that fields name and it will sort of bringing it up to you. Then it ask you whether you [00:32:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s) would like to show this field in the admin view. In the admin list view and that means if you've closed your editing area there is a list of names here and if you want that specific field to show up in this list then you would select 'show'. [00:33:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m18s) If you have selected 'show' you could tell us in which order you want this. Must it be the first one, second one, and we thought well you shouldn't do more than a 100, it will look ridiculous. So you can say I want this one to show up first. Now the title in alias concept in Joomla is quite interesting [00:33:41](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m41s) It's actually needed especially if you want to do history control or integration with Joomla's infrastructure when it comes to their history and tagging systems. You need to add a title and an alias to all your views [00:33:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m59s) especially if it is a view that is going to be used in the front. So in this case since we are going to use preachers in the front to display list of preachers, we most certainly going to add a title, and we are going to use the name as the title. Then again back to the back end. Do we want to have this 'sortable', do we want this thing to be clickable there, so you can click on it, and it sorts the table alphabetically [00:34:30](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m30s) on the basis of this column. So if you want to have it 'sortable' then do you want to have this field be searchable. Do you want someone to type into this box? We take 'warehouse' for example, type it in there and search. Do you want it to [00:34:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m51s) show only that specific field. So if you want them to be able to search for it you, say yes. Then the filter option is a tricky one. You don't want to set name to filtering because then it will show a list of all the names that already is being shown in the table. You only want to use filter on things that are like a radio box or a [00:35:19](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m19s) other view or you know fields that actually are not all being displayed one after the other in the table. So for our example I added, let's go to sermon distributor and preacher. I added no extra fields there, but at sermons I added preacher. So there's a list of all the preachers here so I could sift and say ok I don't want to see this preachers sermons and then it shows up only those, so that is the filters and the way that you set up the filter is simply by clicking yes or no here and it will set up that filter for you. Then this link if you are setting up a custom field and you want to be able to [00:36:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m12s) in the display of the list have it clickable so I can click here and actually go to that preacher. And then click close and then I'm back in the sermons list view. I could also click on series and it will take me to the series, and I can edit the series immediately. And click close and take me back to the list view. So if you want that feature for the specific item then you need to tick yes here. Now usually we used the name as you see here to be the clickable title, if you select your title here and you click link then your actually telling us that this field item here is actually what we should use as the clickable option to open that actual sermon. So here we'll have that actual sermon opening up and all it's related fields. [00:37:16](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m16s) So that is the way for us to know which field should be used as the clickable field if you have a title. Now this concept is something that you might need to play with and since it's so easy to change it you can just click a button here to compile your component, install it, look at its behavior, change it a little, compile it, install it. Look at its behavior by doing that you would get a good understanding of what happens if you change these switches here. Now we said that we wanted the preachers name and stuff on the settings and our tab for settings as the first tab. Now we going to look at the back end setup in Of where you want to have this fields display. There are these different placing options left in tab, right in tab, full width in tab, above tab, underneath tabs, left of tabs, right of tabs, and then [00:38:20](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m20s) there is the order in which it should go. That means if we look at this again this is left in tab(left side of the screen), this is right in tab(right side of the screen), I think I have another view that goes beyond some of those parameters. Let me go to this one and we do question. So that is right of tab, not in tab, you see there is an option it says; right in tab, left in tab, and then it says left of tabs, and right of tabs. That means that you can put it out side of the tab area. So even if I was to click here it will remain displayed right there on the side and that is to put it right of tab. There's also a left of tab area over here. [00:39:31](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h39m31s) Then a above tab is this one here, that's above the tabs. So it also shows all the time and and then there's underneath tab. We basically added the option of placing data. I will just show you. At the right in tab, left in tab and then right of tab and left of tab and above tab and beneath tab which is 1, 2, 3, 4, 5, 6, positions in the back end of your template. And the places are being set simply by these alignment assignments here (select the field alignment inside the tabview) and you select these(from a list) and then once you've selected them let's say you've selected this one above tab and you selected 1 then this is the order in which you wanted to display. First this one, [00:40:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m35s) then that one, left in tab. This is first, right in tab, this one is first, and then that one, and full width, it is a description. Now full width will always display under the left and right of in tab. So you need to select your left and right and then only your full width. Full width is always the last thing to show up in a tab, and then here is the switch to add permissions to a specific values. So if I was to say you know what, I want the control, which group can edit the name field, you simply need to click this yes, and that would add this field into the permissional structure dynamically. That is how you you control the permissions of fields. That is how you add fields to a view and those are all the different switches. You can only have one title per view and only have one [00:41:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m39s) alias per view. You should not have more than one selected. In any case I think the system will ignore the others but just to be safe set the others to no. And then those that are actually the title to yes, and the one that's actually the alias, to yes. And so we will be able to be sure to use the correct field values. And then when you set any of these to show, you should set the order of their display here, and there is the filter. The filter then is added dynamically by simply clicking a yes here. If we go to sermons as an example, and we click on their fields they have many more fields which will help to illustrate some of these things. And you'd see that we have sermon series and we have it set up as a filter. Filter is the second last column. [00:42:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m43s) Sermons series, let's see we set that to yes, so that means we can sort this sermons by series that is how you set the filters for the back end. Remember this is primarily for the back end. Although some of that information will relate to the front eventually, especially this permissional switch will be able to access it from the front if you need to. But this is simply to add the fields to the actual view in the back end. If you have any questions about this please give me a heads up if you feel like I haven't done a good enough job explaining this, then let me know and I'll redo this video. So that's adding fields to the admin views. There are much more things to explain here and I think the only thing I'll still cover in this tutorial is the actual conditions this is an amazing feature [00:43:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m47s) which goes beyond Joomla's control on the show on attribute per field. Remember we looked at the show on attribute and the show on attribute can control which fields to show when you are clicking on other fields. For example here we have a field called add JavaScript. If I click yes it opens this area Java Script where I can add custom scripting. Now that behavior is being controlled by this condition structure. The condition structure for sermons are the following; if you can see there is a few already being set. So what we will do, we will first decide which field are we targeting. Which field do we want to show or hide. That is the behavior. Do you want to show a field or hide a field? Now most of the [00:44:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m51s) time we'll use show. Show means it will be hidden unless these criteria's are met. Show is the one I use the most and I think most will use that mostly. Here is the list of all the fields in your system. You might say, why don't you just show the fields that I've selected as part of this view and unfortunately that feature isn't in place yet. So you need to remember which fields you selected in the fields area. And for our purposes it is these fields and you need to remember their names. Then when you go to the conditions, when you type a field like name, you need to know it is this one. That is how you would link to them. I've build on option, files is a field and I wanted to show. Now this isolate and chain function is a concept which I believe would [00:45:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m55s) be best explained when you think about that not only one field must be used to show the other one but more than one field. So in this case Dropbox auto note in sermons should not only show when fields source is Dropbox, but also when built option is automatic. So that both of these should be true before it shows the Dropbox note. And so you would select the field you want to control, obviously you can control more than one at a time, but the logic behind this might not always work so you need to try it, test it, if it doesn't work come and tweak this until you you find it working in behaving the way you expect. So most of the times [00:46:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m59s) you would only link one field to one validation. But as soon as you have multiple fields, you would use the chain option. So it's either isolate like this one. The build option of files should show when file source is Dropbox. Then it's isolated, it isn't connected to any of the other settings here. As soon as you click chain, it means any other field that has this row, this is a row, that has this field selected as well will be chained together. So that it must be both being validated as true before. It actually will show the field. So let's look at it. It says file source and you can select any of these if you know that this file source is a list. Then you can look at list and see the list options. This is only for text, and it says that, only 4 text_field, only 4 text_field, [00:48:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m03s) only 4 text_fields, only 4 text_fields. This is only for list and radio and check boxes and dynamic lists. This is only for list radio and check boxes, this is only for list radio, and check boxes. Then you can say 'is' or 'is not' So if it 'is' Dropbox, then it should show, if it 'is not' Dropbox then it should show. That is the the logic behind it. Now here this one(any selection) is when you're dealing with a dynamic list. Unfortunately with dynamic list it's quite difficult to set these values since they are dynamic. And so the best way to deal with a dynamic, would possibly be to leave this blank. So that means that if any of the values are selected show this item. We will still look at dynamic list or custom fields [00:49:07](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h49m07s) and we will explain to you how to set up those custom fields. That is basically what that option is for. Most of the time we are using this 'Is' and when you select that specific field, let me show you if I select file source. If the field that you've selected is a text field, the system will show you that by saying keywords or length. So you can say I want if he has put in a length of '2' characters then show. Then you take keywords away. So then that is how you can use the text field. Now you would change this to [00:50:11](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h50m11s) 'Active', that is active and that it has a length of '2'. That's how that would mean if you know that what you've selected is a list, it will show you the list but it show you all the values and then you can remove the values that you don't want to use. And the only value that's really important is that 2 the other is just for you. So you could just leave 2. That will be the same as that we are just showing you. In fact what I do is I explode the string at the pipe and I only use the first value to develop the JavaScript. In fact the Java Script that is being written. We are in the sermons view, let me show you that, so we would go to Component Builder, admin, components, sermon distributor, modules, [00:51:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h51m15s) forms, and then you'd see there are two, there's a XML which is the fields and then there is a js which is actually the Java Script. So we open that and here's all the JavaScript that component Builder would build. Now if we look at this let's go there it's only these are the conditions. So these are the conditions it's not even that long of a list, but to implement these conditions component builder builds this JavaScript so it starts up here and all of this JavaScript is the implementation of those things that we set there all the way down to there. So that means about 500 lines of JavaScript gets written by component builder just by these switches [00:52:19](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h52m19s) that you set up here. Now I'm showing you where the script is being written so did once you've set up these switches you can come into this script and if you remember the field name that you are working with so for example let's look at it, build option is the field and files source. So let's look if we can find that here. There is source so it gets the value when the page is ready it checks the jform on this called source what is the value and it puts it in here and our first function obviously I'm using a random function name generator as you can see and it's start with V and the next one would be VW and so on and so on and [00:53:23](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h53m23s) So that means you need to now how we implement this function hiding and showing of the source. You would search for the V function by just adding a bracket there and search ok so it's the first function. And I'm basically saying, is it set? if it's set, then I add a source constructor and if it's an array, is this an array? checking the value whether it's an array. If it's not an array I put it into a temporary array. There we push it into the temporal array. And if it is an array and it isn't set we just create a blank array. Then we do a validation here and again this you can go check. [00:54:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h54m27s) So basically the function is that one(source_vvvvvvv_somefunc). So let's check that function and all that function does is it checks, is it 2? If it's 2, it returns true, if it's not 2 it returns false. So you see it's quite simple and the value whether true or false is returned to source. We put source into if it is true then we close that view. Sorry we get the closest class called control group. And we check, is this field required? If it's required and these are some home works that we do. Now if it's false then we hide it, and if it's required we do some house cleaning so that is simply a quick looking at the code which is being generated just by this one switch. [00:55:31](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h55m31s) This is not the only code there is another place and that is in the view itself. We are looking at sermon then template and edit and then from around here we have JavaScript again. And again of a we have on keyup for source or on change, because the system doesn't know, is this a text field or is this a list field or what is it? So we have these two check function on it and also there is another place where source is going to be used for another functions. We just focusing on this one and so it gets the value and it runs that function which is in our JavaScript file. So here's the JavaScript file, there is the function. So it's reusing the same function. [00:56:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h56m35s) The moment that there is a keyup or a change on that specific field. That is what I've done. Obviously other developers who are more advanced in JavaScript than I am, get's involved I could show them where in component builder the script is being generated and we can improve this dramatically. I am not that good at JavaScript and in fact I feel like most probably a little bit resource-intensive here but this is the best I could do so far and obviously if we can improve it and if you know how to improve this then you welcome to get involved on GitHub and start with a discussion on improving this infrastructure. I can tell you that this infrastructure is done in the compiler of course and I can show you exactly on which line this was developed. In fact all you need to do is when you compile your component just if we [00:57:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h57m39s) go back to components. Here we're inside a component. All you need to do to know where that is being built it's just tick this to yes and then it will add in the comments it will add a line reference of where that specific script is being build. Let's go back to the admin views. We're not really finished, so this is structure that you can use to actually manipulate the conditions upon which field should show or not show. and I really think we have done a very good implementation here. It gives you so much possibilities of structuring and chaining and working with fields in its relationships if you want to not use this and just use the on show then that is also going to work just as well in fact I think it will work better. The only problem with the on [00:58:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h58m43s) show, is that it doesn't actually provide the ability to target as a text field like we have here. Where you can add a keyword and say OK if they types in 'his' for example, then immediately this other field will show up which is an excellent feature. I mean I don't think you can get that kind of intricacy with show on option and furthermore it cannot look at multiple other fields if they have certain values and if it evaluates true then only show the other field. Those kind of controls are not yet available in the show on implementation as far as I know, and yes I possibly would like to get involved on the get repo of Joomla and see if we can add these nice features. But for now we have add them to Component Builder. In component builder you can implement these(match options) and we are writing the JavaScript to manage this [00:59:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h59m47s) for you. That is your conditions for fields. We've looked at all of these(permissions, tabs, fields, conditions and linked views). The next one is basically the list of the fields that you have already selected and clicked save. It will show a list of all the fields that you've selected. Again any of those fields, if you want to update them, you could just click on the field name and it will take you to the field and you can update it. The next tab is a place for you to add custom CSS that is just related to this specific view. You can add CSS here, which is for the edit view or the single view and you can add CSS here, which is for the list view or the multiple views (plural). Then it will be placed in its prospective places. The same goes with the JavaScript, accept that you have four places to target instead of just one. If you remember when we looked at the way that we are [01:00:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h00m51s) building the JavaScript there is a file, a JavaScript file, which just has JavaScript for the view and then there is the footer area which is under the HTML and PHP at the end of the file there is a whole area which is just JavaScript at the footer of the file. And so we decided to add the option of adding JavaScript to the file or JavaScript to the footer. (The view file or the view footer or views file or views footer). So it just gives you the option of targeting. If you know list and this script can run as a function and I just wanted to be able to be on the page. Then you add it to the file and then if you want to use the function you can add it to the footer. That it's up to you. Then there is a PHP area and here you have the option of adding JavaScript to your editing view [01:01:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h01m55s) primarily. If we look at editing views, the moment you click on add JavaScript, it opens a tab and now the way that we want to implement ajax is primarily via the controller and method implementation. So if I explain that to you the component has a controller called ajax.json.php, you can open that. Then it has a model we call it ajax. So you have a controller and you have a model. Now the controller is like the gatekeeper. He first does a few checks and balances to ensure that the data is Correct that that the token is right that if you have set this to be [01:02:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h02m59s) validating whether he is a user, then it also checks that there's a user ID. If you have set it that it doesn't require them to be a user it basically would drop off this validation. I will show you that in a moment so that you can follow me. There is a controller area and then there is some model area. The model is basically a place where you can write a method which is queried from the controller. So you can see in the controller it basically gets the ajax model, and then it is querying a method in that model called Dropbox. Here we are querying the Dropbox method and it's getting the view name. I'm not [01:04:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h04m03s) using this variable but it is here and I possibly will use it later if it becomes necessary so I'm basically just activating this method to run and when this method runs it triggers some global methods to run and on the return of that value it triggers another local method so again I'm not trying to teach you php here. All I want to show you is that this part of the code was custom written. If we go back to our component you'd see that there is that code. So when you click on ajax you add that name basically writing a method make sure that it's set to public and your write your method in here and in the ajax input, you would say the task name is check dropbox listing. The values I want to pass it is view and [01:05:07](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h05m07s) type. And both of them are integers and it needs to run the view, needs to run a dropbox method. And the type needs to run an update dropbox. And both of them should check whether it is a user. So only users can fire these back end methods and the you can see that you have control to tick that. The filters are the same as with any field that you can select. [01:05:45](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h05m45s) And so integer here would be fine and if there's no value you set null. This task name is what you be using in your JavaScript. So I first wanted to show you the PhP side and then the task name itself. Let's just make sure I do not miscommunicate here. The method name is set here and that should correspond [01:06:07](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h06m07s) to the method that you set up in your php Ajax method. Which is possibly the method in which you model the data, get the data, structure the data, and give it back to the Ajax call. So you return the data inside of this method, but in your JavaScript you will be using the task name to [01:06:29](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h06m29s) get to the system. So if we go to the JavaScript, close out, go JavaScript. It seems I used the JavaScript example which is going to get way ahead of us but since we started let me not leave you in mid air. So I have to close out here. [01:07:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h07m00s) In sermon distributor which is the component to which that view belongs is a place called scripts and I have added a feature which is called chronic global [01:07:23](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h07m23s) events. So I have added a feature to add global events. Now global events or the way I am implementing it, is simply an event that should run every time a page opens. Anytime any page in the system opens, I wanted it to run the global event. Now the way I target it is, I say load Dropbox Ajax [01:07:50](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h07m50s) is a global event and it needs to do that. And the Dropbox Ajax is basically set up in the helper class. So I have a helper class which is called load Dropbox Ajax and it gets the document object. [01:08:11](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h08m11s) It takes the document object it adds a script declaration to it and here is the JavaScript that it is adding. And you see, in that, it is using check Dropbox listing as the task. So it's targeting the ajax [01:08:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h08m32s) controller and asking for check Dropbox listing as the task and it's passing to it a token and a view name. So possibly we would like to use that view ID later to log from which area this automated [01:08:52](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h08m52s) feature mostly gets triggered. I'm not doing that as yet so this is just what the script will do. So there is jQuery which only fires of after the page is loaded. And at the moment it's just adding a dummy 3 in there to just trigger the method. [01:09:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h09m10s) And so that is really how this script ends up on the page. I'm sorry that I used that as an example I realise it's a little bit ahead of ourselves, but nonetheless I want to not leave it at a loose end. So I am redoing it actually for you. [01:09:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h09m32s) That is where this php script are going to be used. So since I need to add this somewhere I just selected a view to advantage it to this sermon view. And I added the ajax controller concepts here, but the actual JavaScript that fires off all this, is set to the global event and that means every time a back end area is opened in this component, [01:10:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h10m00s) it loads that JavaScript to the view. And JavaScript executes a ajax request which starts updating the Dropbox listing. I'm not going explain all of that Dropbox listing to you now, it's a quite an advance concept but it's basically sermon distributor that is able to link to a media inside of a shared Dropbox folder. And this whole method here that we looking at [01:10:28](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h10m28s) parses that Dropbox folder every so often to make sure that it's to date. That's what it's all about. So that is just looking at adding ajax. Here you can see that if you know the Joomla API, you know that it has a (getitem method) [01:10:45](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h10m45s), it has a (getitems method) in the model. In the model there's a (getitem method) in the editing model. In the list model there is a (getitems method). Then there's a (getlistquery) in the (jmodellist). And there is a (safe method), there's a (postsavehook method) in the controller. There is (allowedit method). +[01:11:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h11m10s) There's a (batchcopy method). There's a (batchmove method). There's a (script before delete) method. There's a (script after delete). And these are all PHP places in which you can dump custom scripting. So if you want the safe method, [01:11:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h11m32s) you need to know where the save method is, so if I would open sermon here, scroll down to get item. So you can add custom scripting to the get item method. [01:12:06](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h12m06s) +There is save method and so if we go back here and we click on the save method, it says here, that should run PHP here, that should run in the save method. And then you have the data, it's a array and it's called [01:12:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h12m27s) data. So If you look here it means you're able to target that value. It gets placed into save. - -There is safe method and so if we go back here and we click on the safe method, it says here, that should run PHP here, that should run in the safe method and then you have the data it's a array and it's called [01:12:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h12m27s) data. So If you look here It means You're able to Target that Value The gets placed into Save Ok And I am sure that your custom [01:12:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h12m47s) Value Code Will be placed in before the parents saved But if you do not If you do not know in any of those Custom scripts Where that code will be set What you can do is just type It is [01:13:06](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h13m06s) Loaded Here And then compile save it and compile the component and then go look at the code And you see where it is showing up And then you can add Ok I've got all these values already In the script Because all that component builder is gonna do it's just gonna Let's say It will just say [01:13:37](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h13m37s) That's that's how it will look It'll just add to string so when the component itself runs it will treated as code This is a comment but I mean if it was code You just execute So it is the way for you to add custom scripting Right into your component Almost anywhere really You are able to Target Through these switches The post save hook [01:14:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h14m05s) Is actually in the controller not in the model So You go to the controller Sermon Scroll to the bottom And you see there is a post save hook And it basically gives you the model and it gives you the valid data and you can Actually can perform extra features on it [01:14:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h14m27s) But in all these things You you should just read the description here it says PHP here that should run in the post Save hook method And there's the object model is the data model Object and the erased validator is the validator So if you just read our little note here Then you can start coding For it Ok That is so adding custom scripting To the view [01:14:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h14m55s) Basically the list view as well as the Each View And then the MySQL dump area Which we looked at earlier You can do two kinds of dumps now What is this used mostly for Well what I found while I was Busy developing That I would be Busy setting up a component [01:15:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h15m15s) and install it and then add dummy data to it to see if it works And then every time I make a change And I uninstall that component and install the new one Because whatever change it made to the database Won't be You're not added to the database via an update You need to uninstall the component and install it again To get the database back to where you want it And so the only way I could do save myself [01:15:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h15m43s) Time Is to actually say listen I'm gonna Re-install this component and the dummy data for sermons I would like to retain And so I would go table and I Open the tables it will show me a list of all the Tables that are in the database at that moment And then I would scroll to sermon the Sermon table click on it [01:16:06](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h16m06s) And it will load The table and What it should be called In the data set Here is some explanation if you want to do Other tables so let's say you wanna have it mapped to multiple tables then this is the explanation on how to Do that I would not recommend doing this because possibly You will not get [01:16:29](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h16m29s) What you expect And so Just going with the values that it populates for you will Possibly your best call Unless those values change And if you are making changes adding new fields You must realise that you need to come and reset this by clicking on something else And then clicking on it again And that it loads the new [01:16:57](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h16m57s) list of Fields that are related to this table To this Back end view Table And that way When you compile the component then component builder will actually grab the data From the database and build a dump file for you Now that is one way of doing it [01:17:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h17m18s) I might be a little bit complex but it is saved Tons of hours The other way would be to just do a dump file itself So you'd go to Your Your MySQL you would open the specific let's Use this thing that is Smaller Field types [01:17:40](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h17m40s) And you click on Export And then you would select A sequel format And click go And this will create a dump file Of all the data in the table And you can basically Paste that dump file in here Now [01:18:17](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h18m17s) I was looking at Important So you click export click quick Then SQL and then Go And then just save it Then Go to that file Open it And having it open [01:18:41](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h18m41s) You just replace This String With Hash Underscore So and then replace all And you will not use the table Structure because that is already in component builder You just use [01:19:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h19m03s) This area here Basically you would copy this Area like That Cut Come here paste And click save And that will mean that you have to dump file And it will always be added [01:19:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h19m36s) To your new Install If a dump file is way too big You will see it by just after your clicked save come and look At the end And see if it cut it off somewhere So let's say it cut it off there that I know my dumb file is To big for the use [01:20:04](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h20m04s) Structure For your dump File I used medium text let's see medium text Here Prosafe There it is Sequel I used medium text [01:20:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h20m39s) So that means It's quite big You can really put a lot of Text inside of it You wanna know exactly how much just Google it and you will see I'm gonna remove this obviously because It's not related to sermons at all And [01:20:57](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h20m57s) In fact I'm not even go to use the dump here, save and close Ok That is basically setting up an admin View I know I've run around and it seemed quite hectic And I possibly will redo this video at a certain stage Try to be Structured But I think it is informative enough [01:21:20](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h21m20s) And if you Have any questions please email me and I will Try to communicate with you And if I see that a certain question comes up often enough I will add it to the Video Possibly redoing Specific area [01:21:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h21m35s) Admin views is quite intense And we will possibly revisit many of the Concepts that we have looked at today Thank you for watching + And I am sure that your custom [01:12:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h12m47s) value code will be placed in before the parents saved But if you do not If you do not know in any of those Custom scripts Where that code will be set What you can do is just type It is [01:13:06](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h13m06s) Loaded Here And then compile save it and compile the component and then go look at the code And you see where it is showing up And then you can add Ok I've got all these values already In the script Because all that component builder is gonna do it's just gonna Let's say It will just say [01:13:37](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h13m37s) That's that's how it will look It'll just add to string so when the component itself runs it will treated as code This is a comment but I mean if it was code You just execute So it is the way for you to add custom scripting Right into your component Almost anywhere really You are able to Target Through these switches The post save hook [01:14:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h14m05s) Is actually in the controller not in the model So You go to the controller Sermon Scroll to the bottom And you see there is a post save hook And it basically gives you the model and it gives you the valid data and you can Actually can perform extra features on it [01:14:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h14m27s) But in all these things You you should just read the description here it says PHP here that should run in the post Save hook method And there's the object model is the data model Object and the erased validator is the validator So if you just read our little note here Then you can start coding For it Ok That is so adding custom scripting To the view [01:14:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h14m55s) Basically the list view as well as the Each View And then the MySQL dump area Which we looked at earlier You can do two kinds of dumps now What is this used mostly for Well what I found while I was Busy developing That I would be Busy setting up a component [01:15:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h15m15s) and install it and then add dummy data to it to see if it works And then every time I make a change And I uninstall that component and install the new one Because whatever change it made to the database Won't be You're not added to the database via an update You need to uninstall the component and install it again To get the database back to where you want it And so the only way I could do save myself [01:15:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h15m43s) Time Is to actually say listen I'm gonna Re-install this component and the dummy data for sermons I would like to retain And so I would go table and I Open the tables it will show me a list of all the Tables that are in the database at that moment And then I would scroll to sermon the Sermon table click on it [01:16:06](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h16m06s) And it will load The table and What it should be called In the data set Here is some explanation if you want to do Other tables so let's say you wanna have it mapped to multiple tables then this is the explanation on how to Do that I would not recommend doing this because possibly You will not get [01:16:29](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h16m29s) What you expect And so Just going with the values that it populates for you will Possibly your best call Unless those values change And if you are making changes adding new fields You must realise that you need to come and reset this by clicking on something else And then clicking on it again And that it loads the new [01:16:57](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h16m57s) list of Fields that are related to this table To this Back end view Table And that way When you compile the component then component builder will actually grab the data From the database and build a dump file for you Now that is one way of doing it [01:17:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h17m18s) I might be a little bit complex but it is saved Tons of hours The other way would be to just do a dump file itself So you'd go to Your Your MySQL you would open the specific let's Use this thing that is Smaller Field types [01:17:40](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h17m40s) And you click on Export And then you would select A sequel format And click go And this will create a dump file Of all the data in the table And you can basically Paste that dump file in here Now [01:18:17](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h18m17s) I was looking at Important So you click export click quick Then SQL and then Go And then just save it Then Go to that file Open it And having it open [01:18:41](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h18m41s) You just replace This String With Hash Underscore So and then replace all And you will not use the table Structure because that is already in component builder You just use [01:19:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h19m03s) This area here Basically you would copy this Area like That Cut Come here paste And click save And that will mean that you have to dump file And it will always be added [01:19:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h19m36s) To your new Install If a dump file is way too big You will see it by just after your clicked save come and look At the end And see if it cut it off somewhere So let's say it cut it off there that I know my dumb file is To big for the use [01:20:04](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h20m04s) Structure For your dump File I used medium text let's see medium text Here Prosafe There it is Sequel I used medium text [01:20:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h20m39s) So that means It's quite big You can really put a lot of Text inside of it You wanna know exactly how much just Google it and you will see I'm gonna remove this obviously because It's not related to sermons at all And [01:20:57](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h20m57s) In fact I'm not even go to use the dump here, save and close Ok That is basically setting up an admin View I know I've run around and it seemed quite hectic And I possibly will redo this video at a certain stage Try to be Structured But I think it is informative enough [01:21:20](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h21m20s) And if you Have any questions please email me and I will Try to communicate with you And if I see that a certain question comes up often enough I will add it to the Video Possibly redoing Specific area [01:21:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h21m35s) Admin views is quite intense And we will possibly revisit many of the Concepts that we have looked at today Thank you for watching