Updated 007 Admin Views (markdown)

Amigo 2019-07-15 15:30:25 +02:00
parent 660bb9b184
commit df0baaf4ce
1 changed files with 38 additions and 8 deletions

@ -1,22 +1,32 @@
# ADMIN VIEWS
[00:00:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m00s)
In this tutorial we are looking at admin views, the next step of developing your component. First we started with field types and how to set up and improve on them. Then we learned to use those field types to build basic common fields. Now we are going 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)
### Naming Convention
[00:00:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m35s)
Admin views, like I explained in our initial General Planning tutorial, forms the basis of your component's database structure. 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 admin views have their own table. They have a single name, a list record or a plural name. Then there is a system name. The reason why there are three is that when you want to reuse a specific admin view in another component with the same name, but adapting it to that component, you would then have two of the same names showing up in your selection list when you add it to the component. [00:01:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m21s) It might then be difficult to discern which is which, hence you can add the name of that specific component as part of differentiating between the same names. [00:01:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m47s) That means you can have admin views with the same names, but with different implementations. That is how you can do different version control concepts on components, using the same admin view, making a few changes inside of it, and then saving it. [00:02:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m03s) You can open the name, type free version, and save as copy. You can then change some of the fields that are linked. You can change some of the linked views, your CSS, or whatever other things you have done regarding this admin view. [00:02:25](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m25s) Now go to the free version of that component and link that specific view instead of the other.
### Creating an Admin View
Click 'new' to create an admin view. [00:02:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m54s) I'm going to open preacher, because it's the one we are using as our illustration. You'd see that there should be a name for a single record. That is where you would edit these records. (In this case, it is preacher.) Below is a list of records that are 'preachers'. [00:03:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m14s) There is a short description and a normal description, depending on what you would like to say. There is a type; 'read/write' and 'readonly' which changes the component's editing view. If you say 'readonly,' the fields wouldn't be editable. [00:03:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m36s) The 'Modified By' field cannot be edited because it's done automatically, and when it was modified, it updates every time you click save. [00:04:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m02s) If you leave it on 'read/write,' you will be able to edit it.
[00:02:49](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m49s)
Click 'new' to create an admin view. I'm going to open preacher, because it's the one we are using as our illustration. You'd see that there should be a name for a single record. That is where you would edit these records. (In this case, it is preacher.) Below is a list of records that are 'preachers'. [00:03:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m14s) There is a short description and a normal description, depending on what you would like to say. There is a type; 'read/write' and 'readonly' which changes the component's editing view. If you say 'readonly,' the fields wouldn't be editable. [00:03:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m36s) The 'Modified By' field cannot be edited because it's done automatically, and when it was modified, it updates every time you click save. [00:04:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m02s) If you leave it on 'read/write,' you will be able to edit it.
### View Icons
[00:04:16](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m16s)
There is a place for an icon. (If you hoover over the icon it gives you the dimensions that is needed.) When you look at the dashboard, those icons there are the ones selected. [00:04:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m24s) The icon has two options: 'Add Icon' and 'Icon.' If you hoover over 'Icon,' you should see the images if they are set in your images folder. [00:04:46](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m46s) If you open this, it goes to your image folder where you select the icon. If you are going to add a field called category that is of the category type, then you should add a category icon. [00:05:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m14s) Since the system will then automatically know that there has to be a category setup, and will look for a category icon to use for that category. If you select a category field that is a general category for the whole component, which isn't directly linked to this view, it will take the first view (the system, when processing, will see which view is first, which would usually be the first one you've created) and use the icon in that view. To be on the safe side, if you are using one category for them all, set the same icon on them all. [00:05:37](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m37s) If you are going to use a category which is primarily focused on the preachers, and you are going to put preachers in a category, you need to add a category icon for categories. [00:06:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m02s)
### Permission Implementation
[00:06:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m15s)
The permission switch is related to accessing and updating of data. Here we have admin views edit, admin views edit state, admin views edit own, admin views create, admin views delete, admin views access, and admin views edit version. [00:06:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m24s) If you are in the managing group and the particular edit is set to allowed, you can edit it. If you are a guest and it is set to deny, no matter where you are in the front or back of the site, (even if you have a direct link,) you won't be able to edit this information. [00:06:49](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m49s) It does has view access so that somebody who might be not allowed to edit, can still view the content in the back end in the list view. [00:07:08](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m08s) It will show in the list view, and they can see that it is there. You might want to display the record and leave a custom admin link to the data. [00:07:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m32s)
Here is an example of a component that does that. There is a button underneath the company name. The record is being displayed, but if the profile is set to being locked and I was to click on this, it will tell me that I do not have the permission to edit it. [00:07:53](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m53s) But if I click on the icon below the company name, it loads the information that I am looking for. [00:08:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m12s) Sometimes you want to use a custom or to do something that is not an editing view; or you would like to see the record, but not edit it. [00:08:36](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m36s)
@ -37,6 +47,8 @@ One of the features that makes Component Builder far more advanced than other co
### Tabs
[00:19:26](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m34s)
The tab structure. We call these tabs. (See video.) [00:19:27](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m27s)
* Publishing and Permissions: Example of What Tabs Can Be
@ -49,7 +61,9 @@ In 'Preacher' I set up two tabs: one called 'Details' and one called 'Sermons.'
### Linked Views
When you create fields you'd see a column called tab in which you'd select a number, from one upward. [00:20:53](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m53s) Because we are using a different location than the tabs, we don't use the names. [00:21:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m15s) When you set up a field, you need to tell in which tab you want to place that field. That is what the tab number is all about. [00:21:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m35s) You might wonder where tab two's information is. 'Sermons' is actually a table on its own; there is an admin view called sermon, and it has its own back end view and structure. [00:22:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m02s) We created a thing called 'Linked Views' to get the 'sermons' related to this 'preacher' to show in the second tab, 'sermons.' (See video.) [00:22:25](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m25s) Selecting 'sermon' as the view, I set it to be placed in the second tab. The 'Parent Key' would be the view in which you are the moment that you are setting up the linked view. [00:22:49](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m49s) It depends on the view you are editing. Hence, if you are in 'preacher' the parent is 'preacher;' if you are in 'sermons,' the parent is 'sermon.' So in this case, when we talk about the child key ('preachers') it would be the database field name that is to be looked at. [00:23:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s) The parent field name ('id') would be found in 'preachers.' [00:23:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m38s)
[00:20:53](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m53s)
When you create fields you'd see a column called tab in which you'd select a number, from one upward. Because we are using a different location than the tabs, we don't use the names. [00:21:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m15s) When you set up a field, you need to tell in which tab you want to place that field. That is what the tab number is all about. [00:21:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m35s) You might wonder where tab two's information is. 'Sermons' is actually a table on its own; there is an admin view called sermon, and it has its own back end view and structure. [00:22:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m02s) We created a thing called 'Linked Views' to get the 'sermons' related to this 'preacher' to show in the second tab, 'sermons.' (See video.) [00:22:25](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m25s) Selecting 'sermon' as the view, I set it to be placed in the second tab. The 'Parent Key' would be the view in which you are the moment that you are setting up the linked view. [00:22:49](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m49s) It depends on the view you are editing. Hence, if you are in 'preacher' the parent is 'preacher;' if you are in 'sermons,' the parent is 'sermon.' So in this case, when we talk about the child key ('preachers') it would be the database field name that is to be looked at. [00:23:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s) The parent field name ('id') would be found in 'preachers.' [00:23:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m38s)
If you go to fields you will see a field called 'Sermon: Preacher'. This is the field that we want connected. [00:24:10](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m10s) To get the sermons belonging to that 'Preacher,' we need to get the ID of this field. [00:24:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m35s) Opening this field you will find that it's name is preacher. That field will be connected to 'sermon,' so it means that in the database the ID, which is the key field, is going to be saved in 'preacher.' 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) You can see this in the database. Open 'sermondistributor_sermons' and find 'preacher.' It has ID's in it and those are the preachers' IDs. So we are linking the 'preachers' to these IDs here. [00:25:24](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m24s)
@ -61,27 +75,35 @@ Open the admin view. (See video.) [00:29:32](https://www.youtube.com/watch?v=CdS
### Setting Up Fields
[00320:30](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m30s)
Since we already created the fields beforehand you will start out this way. (See video.) You would scroll down the fields that you created. (If it is a long list you can type the field's name and it will bringing it up to you.) It asks whether you'd like to show the field in the admin list view. [00:32:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s) That means that there is a list of names if you close your editing area; if you want that specific field to show up in this list you'd select 'show'. If you select 'show,' you can set in which order you want this. (See video.) [00:33:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m18s)
In Joomla the title and alias concept is quite interesting. [00:33:41](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m41s) It's 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, especially if it is a view that is going to be used in the front. [00:33:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m59s) In this case, since we are going to use preachers in the front to display a list of preachers, we are going to add a title, using the name as the title. Back to the back end. There you can set if you want this 'sortable' or 'clickable;' you can click on this, and it sorts the table alphabetically on the basis of this column. (See video.) [00:34:30](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m30s) Do you want it to be searchable? Do you want someone to type into this box and show only a specific field? [00:34:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m51s) 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 are already being shown in the table. You only want to use filter on things like a radio box, another view, or fields that aren't being displayed one after the other in the table. [00:35:19](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m19s) I added no extra fields in sermondistrubutor, but at sermons I added preacher. There's a list of all the preachers here, through which you could sift a chose which to show here or not. The way that you set up the filter is by clicking yes or no here. If you are setting up a custom field and in the display of the list have it clickable, this link is used. [00:36:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m12s) For example: I can click here and go to that preacher. I click close and then I'm back in the sermons list view. I could click on series and it will take me to the series; I can edit the series immediately. I click close and I'm back in the list view. We usually use the name to be the clickable title. If you select your title here and click link then you're saying that this field item here is what we should use as the clickable option to open that sermon. (See video.) [00:37:16](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m16s) That is the way for us to know which field should be used as the clickable field if you have a title. Since it is so easy to change, you can study this concept. 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.
### Field Alignment
[00:37:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m54s)
We said that we wanted the preacher's name, etc, on the settings. Our tab for settings is the first tab. (See video.) We are looking at the back end setup where you want to have this field's display. There are different placing options and an order in which it should go. (For example, see video.) [00:38:20](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m20s)
* Field Alignment: Example
Let me go to this one, 'Add Question'. (That is right of the tab, not in the tab.) You see an option which says: right in tab, left in tab, and left of tabs, right of tabs, etc. That means that you can put it outside of the tab area. Even if I was to click here it will remain displayed right there on the side. 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) Above tab is this one here, above the tabs. It shows all the time. Then there's underneath tab. We added the option of placing data. At the right in tab, left in tab, right of tab, left of tab, above tab, and beneath tab which is six positions in the back end of your template. The places are being set by these alignment assignments here (select the field alignment inside the tab view) and you select these (from a list). This is the order in which you wanted them to display. [00:40:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m35s) Full width will always display under the left and right of in tab. You need to select your left and right and then your full width. Full width is the last thing to show up in a tab. Here is the switch to add permissions to specific values. If I want to control the group that can edit the name field, simply click this 'yes', and this field would be added into the permissional structure dynamically.
Let me go to this one, 'Add Question'. (That is right of the tab, not in the tab.) You see an option which says: right in tab, left in tab, and left of tabs, right of tabs, etc. That means that you can put it outside of the tab area. Even if I was to click here it will remain displayed right there on the side. 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) Above tab is this one here, above the tabs. It shows all the time. Then there's underneath tab. We added the option of placing data. At the right in tab, left in tab, right of tab, left of tab, above tab, and beneath tab which is six positions in the back end of your template. The places are being set by these alignment assignments here (select the field alignment inside the tab view) and you select these (from a list). This is the order in which you wanted them to display. [00:40:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m35s) Full width will always display under the left and right of in tab. You need to select your left and right and then your full width. Full width is the last thing to show up in a tab. Here is the switch to add permissions to specific values. If I want to control the group that can edit the name field, simply click this 'yes', and this field would be added into the permissions structure dynamically.
### Fields Title
You can only have one title per view and only have one alias per view. [00:41:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m39s) You shouldn't have more than one selected. The system will ignore the others any how, but just to be safe set the others to no. Be sure to use the correct field values. When you set any of these to show, you should set the order of their display here. (See video.) The filter is added dynamically by simply clicking a yes here. (See video.) If we go to sermons as an example, and we click on their fields, they have many fields which will help illustrating some of these things. You'd see that we have sermon series and we have it set up as a filter. [00:42:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZW) So then that is how you can use the text field. This means we can sort these sermons by series.
[00:41:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m39s)
Remember this is primarily for the back end. Although some of that information will relate to the front eventually, this permissional switch will be able to access it from the front if you need to.
You can only have one title per view and only have one alias per view. You shouldn't have more than one selected. The system will ignore the others any how, but just to be safe set the others to no. Be sure to use the correct field values. When you set any of these to show, you should set the order of their display here. (See video.) The filter is added dynamically by simply clicking a yes here. (See video.) If we go to sermons as an example, and we click on their fields, they have many fields which will help illustrating some of these things. You'd see that we have sermon series and we have it set up as a filter. [00:42:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZW) So then that is how you can use the text field. This means we can sort these sermons by series.
Remember this is primarily for the back end. Although some of that information will relate to the front eventually, this permissions switch will be able to access it from the front if you need to.
### Conditions
Conditions is an amazing feature which goes beyond Joomla's control on the showon attribute per field. [00:43:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m47s) Remember we looked at the showon attribute: it can control which fields to show when you are clicking on other fields. For example, we have a field called 'Add JavaScript.' If I click 'yes' it opens this area, JavaScript, where I can add custom scripting. This behavior is being controlled by the conditions structure.
[00:43:47](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m47s)
Conditions is an amazing feature which goes beyond Joomla's control on the showon attribute per field. Remember we looked at the showon attribute: it can control which fields to show when you are clicking on other fields. For example, we have a field called 'Add JavaScript.' If I click 'yes' it opens this area, JavaScript, where I can add custom scripting. This behavior is being controlled by the conditions structure.
* Conditions: Example
@ -89,7 +111,9 @@ The condition structure for sermons is the following. (See video.) You'd see a f
### Isolate and Chain Function
This isolate and chain function is a concept which would be best explained when you think that more than one field must be used to show the other one. [00:45:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m55s) In this case Dropbox Auto Note (in sermons) should not only show when the field's source is Dropbox, but also when Built Option is automatic. Hence both of these should be true before it shows the Dropbox note. You would select the field you want to control. You can control more than one at a time, but the logic behind this might not always work so you need to try and test it. If it doesn't work, tweak it until you find it behaving the way you expect. Most of the times you would only link one field to one validation. [00:46:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m59s) However, as soon as you have multiple fields, you would use the chain option. The build option of files should show when the file source is Dropbox and it's isolated, not connected to any of the other settings here. As soon as you click chain, it means any other row that has this field will be chained together. So both must have been validated as true before it will show the field. Here it says file source. You can select any of these if you know that this file source is a list, you can see the list options. (See video.) [00:48:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m03s) You can say 'is' or 'is not.' If it 'is' Dropbox, then it should show; if it 'is not' Dropbox then it should show. That is the the logic behind it.
[00:45:55](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m55s)
This isolate and chain function is a concept which would be best explained when you think that more than one field must be used to show the other one. In this case Dropbox Auto Note (in sermons) should not only show when the field's source is Dropbox, but also when Built Option is automatic. Hence both of these should be true before it shows the Dropbox note. You would select the field you want to control. You can control more than one at a time, but the logic behind this might not always work so you need to try and test it. If it doesn't work, tweak it until you find it behaving the way you expect. Most of the times you would only link one field to one validation. [00:46:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m59s) However, as soon as you have multiple fields, you would use the chain option. The build option of files should show when the file source is Dropbox and it's isolated, not connected to any of the other settings here. As soon as you click chain, it means any other row that has this field will be chained together. So both must have been validated as true before it will show the field. Here it says file source. You can select any of these if you know that this file source is a list, you can see the list options. (See video.) [00:48:03](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h48m03s) You can say 'is' or 'is not.' If it 'is' Dropbox, then it should show; if it 'is not' Dropbox then it should show. That is the the logic behind it.
This one 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. The best way to deal with a dynamic is to leave this blank. That means that if any of the values are selected, it will show this item. We will still look at dynamic list or custom fields and explain how to set up those custom fields. [00:49:07](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h49m07s) That is what that option is for. Most of the time we are using this 'is.' If you've selected a specific field and it's a text field, the system will show 'keywords' or 'length.' You would change this to 'Active' and that it has a length of '2'. (See video.) [00:50:11](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h50m11s) If you had selected a list, it will show you the list and all the values. You can then remove the values that you don't want to use. (The only value that's important is the 2 there. See video.) I explode the string at the pipe and I use the first value to develop the JavaScript. We are in the sermons view; we would go to component builder. (See video.) [00:51:15](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h51m15s) You'd see that there is a series_xml, which is the field's, and a sermon_js which is the Java Script. We open that and find all the JavaScript that component builder will build. These are the conditions. (See video.) To implement these conditions component builder build this JavaScript. All of this JavaScript is the implementation of those things that we set there. (See video.) It means about five hundred lines of JavaScript gets written by component builder by these switches that you set up here. [00:52:19](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h52m19s) I'm showing you where the script is being written so that once you've set up these switches you can come into this script. For example, build option is the field and file source. It gets the value when the page is ready; it checks the jform on source_. It determines the value and places it in here. Our first function start with V and the next one would be VW, etc. [00:53:23](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h53m23s)
@ -105,15 +129,21 @@ Let's go back to the admin views. This is a structure that you can use to manipu
### Field Listing
[00:59:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h59m59s)
We looked at permissions, tabs, fields, conditions, and linked views. The next one is the list of the fields that you have already selected and saved. If you want to update any of these fields, you could just click on the field name and it will take you to the field where you can update it.
### Custom CSS View
[01:00:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h00m18s)
The next tab is a place for you to add custom CSS that is related to your specific view. You can add CSS here, which is for the edit view or the single view; or you can add CSS here, which is for the list view or the multiple views (plural). (See video.) Now it will be placed in its prospective places. The same goes with the JavaScript, except that you'd have four places to target instead of one.
### Custom Javascript View
When we looked at the way that we are building the JavaScript, you'd remember that there was a JavaScript file, which has JavaScript for the view. [01:00:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h00m51s) There is also the footer area which is under the HTML and PHP at the end of the file which is just JavaScript. We decided to add the option of adding JavaScript to the file or to the footer. It just gives you the option of targeting. If you know list this script can run as a function. You add it to the file and, if you want to use the function, you can add it to the footer.
[01:00:50](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=01h00m50s)
When we looked at the way that we are building the JavaScript, you'd remember that there was a JavaScript file, which has JavaScript for the view. There is also the footer area which is under the HTML and PHP at the end of the file which is just JavaScript. We decided to add the option of adding JavaScript to the file or to the footer. It just gives you the option of targeting. If you know list this script can run as a function. You add it to the file and, if you want to use the function, you can add it to the footer.
### Adding AJAX Via the Controller and Method Implementation