Updated 010 Component Settings (markdown)

Amigo 2019-06-10 15:59:37 +02:00
parent 5692a25e34
commit 870d427d01
1 changed files with 19 additions and 23 deletions

@ -8,66 +8,62 @@ Component builder its self has a compiler view. It's this view here. This entire
### Adding Custom Files - Folders
In files I'm including a bunch of things and that also means I'm including the 'Compiler' and then I take this file and put it in 'admin views compiler' and rename it. In this instance it got the wrong name. If you add the right name at the end of the string and click 'yes', it will rename that file to this(See video), that is adding custom [00:04:16](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m16s) files as well as custom folders. I'm grabbing the compiler views and dumping it into views, and rename it to compiler, compiler views becomes compiler inside of the views folder. The system will first build the folders and then move your data your files to those folders. You will put the files here(see video). [00:04:44](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m44s) And then have the system do the folders and then it will move the files. That's adding custom files to any component.
I'm including a bunch of things in files which means that I'm including the 'Compiler' and that I take this file and put it in 'admin views compiler' and rename it. (It has the wrong name in this instance.) If you add the right name at the end of the string it will rename that file that it is adding custom files as well as custom folders. [00:04:16](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m16s) I'm grabbing the compiler views, dumping them into views, and renaming them to compiler, compiler views becoming compiler inside of the views folder. The system will first build the folders then move your files to them. You will put the files here. (See video.) [00:04:44](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m44s) Let the system do the folders and it will move the files.
### Adding Custom Admin Views
This custom admin menu is basically what I use to the map the compiler menu. I want to call it compiler, the code is compiler. I'm not using a link, because it's not another extension or another website or something like that which you can also do. Then I would select an icon. Here is the information. It's the same kind of switches [00:05:17](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m17s) as with adding a back end admin view. You can tweak whether it should be an admin menu or be a dashboard or be a submenu. Then also in which order behind it says 'select before what admin view this one should be placed'. We are placing it before component.
This custom admin menu is what I use to the map the compiler menu. I want to call it compiler. (The code is compiler.) I'm not using a link, because it's not another extension or website. Now I would select an icon. Here is the information. (See video.) [00:05:17](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m17s) It's the same kind of switches as there was adding a back end admin view. You can tweak whether it should be an admin menu, a dashboard, or a submenu. We are placing it before component, so we select 'select before what admin view this one should be placed'. This means that it can go at the top. [00:05:49](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m49s)
Custom files and folders that you have created by hand and are importing into your component when you compile it. The same is done with the compiler of component builder. I'm including it as files. [00:06:16](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m16s) There is the compiler. (See video.) I took all the compiler files and placed them into the folder called compiler. It's a folder which moves all the files at once.
That means it can [00:05:49](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m49s) go at the very top. That is adding a custom admin menu. Because of custom files and folders that you have created by hand and are importing into your component when you compile it. The same is done with the compiler of component builder. I'm actually including it as files. [00:06:16](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m16s) There is the compiler(See video). I took all the compiler files and I put it into the folder called compiler. There it is and it's a folder which moves all the files at once. That can also be done, like for example, as you see here 'PHPExcel' which is a folder with a lot of content in it. [00:06:48](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m48s) I put everything I wanted to move inside of this folder and then in my component I simply target that folder and it pulls it in .That's simply shows how a whole lot of folders are added to component builder. When I need a back end admin view custom [00:07:18](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m18s) added, this feature here(Custom Admin Views - add) does that.
Here is a folder with a lot of content in it. (See video.) [00:06:48](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m48s) I placed everything I wanted to move inside this folder; so, in my component I can target that folder and it pulls it in. That shows how a whole lot of folders are added to component builder. When I need to add a back end admin view custom this feature here does that. (See video.) [00:07:18](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m18s)
### Adding Custom Config Fields
A quick overview of the area called config. This area deals with something that is actually quite useful. That is to set up your back end global fields. [00:07:42](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m42s) Let me go to sermon distributor. There we've done some really amazing things.Go to 'Sermon distributor', 'settings' and then 'config'. As you can see it is a very long list of things. If we go to the actual component, let me open it and then I'll click on options. [00:08:25](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m25s) You will see that it has many tabs.
The area called config deals with something quite useful. It is to set up your back end global fields. [00:07:42](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m42s) Go to sermon distributor, 'settings,' and 'config'. There is a long list of things. If we go to the actual component, you will see that it has many tabs. [00:08:25](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m25s)
### Custom Switches Using Sermon Component
All of these switches are done in the config area, except some of these defaults which is added by the simple switches. For example the global timer, remember we spoke about the check-in. Here you can set it all whether it should be every 5 hours, 12 hours, once a day, every second day, once a week or never. Checking in your items automatically. The version control buttons are added automatically as well. Which means the person can set the version control 'on' or 'off'. [00:09:07](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m07s) and the number of records that should be set. If 'zero', then all versions will be saved. This is the version control.
All of these switches are done in the config area, except some of the defaults which is added by the simple switches. For example the global timer of which we spoke about the check-in. Here you can set it all; whether it should be every 5 hours, 12 hours, once a day, every second day, once a week, or never. It checks in your items automatically. The version control buttons are added automatically as well. That means the person can set the version control 'on' or 'off' and the number of records that should be set. [00:09:07](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m07s) If 'zero', all versions will be saved.
### Adding Contributors
The author areas is also added automatically. When you click in the 'component' , [00:09:40](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m40s) you will see a 'contributing area'. You can set whether you want to add 'empty contributor fields'. Here(see video) you can add contributors as many as you like, for instance those involved with developing your component and then the amount of empty ones you want to leave there. Its also tweakable. That will basically, add this area here (See video) contributor 1, 2, 3, 4.[00:10:09](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m09s) When you use this switch it controls whether it's been shown in the back or the front of all these kind of features. Which I am not going to go into much depth now. They also are added automatically, as well as the permissional structure .
The author areas are also added automatically. When you click in the 'component,' you will see a 'contributing area'. [00:09:40](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m40s) You can set whether you want to add 'empty contributor fields'. Here you can add as many contributors as you like; for instance those involved with developing your component and the amount of empty ones you want to leave there. Its also tweakable. That will add this area here. (See video.) [00:10:09](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m09s) When you use this switch it controls whether it's will show in the back or the front, etc. They are added automatically, as is the permissional structure.
### Adding UIkit
In the component you can actually set that it includes UIKit, set it to 'yes'. If you do that it[00:10:37](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m37s) automatically adds this feature to your component and every where UIkit is used. So everything else, this Dropbox, preachers, preacher, categories, category, series list, and series and sermons is all done through that config area here(See video).
In the component you can set it to include UIKit. [00:10:37](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m37s) It will automatically add this feature to your component and every where UIkit is used.
### Adding Fields To Custom Config Fields
To add fields to the config area, you first need to add that field to fields. [00:11:07](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m07s) You would go to fields and whatever field you want to use there, you need to create here(Fields). So you first create the fields. Then you need to remember the system name that you're using. Because then when you open up this(add) you would be able to type in the name and it will be selected. And then by convention that tab name as long as you use the same tab name it will be bundled in the order of which you set it here. [00:11:40](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m40s) It is in the Dropbox area where all their fields are being set. The reason why we include this demo component into the application with the tutorial, is that you can go and look and see he's using [00:12:00](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m00s) 'Dropbox update method' here. Then you can go look at this file. The 'Dropbox update method', the files, and the text, and even some of this 'Update listing Now!'. If I click it [00:12:23](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m23s) it starts an update. It even shows it here. How to do this is very tricky. It's not that simple to do that because we are not inside of our component, as you can see, we are actually in the config component in the global if you have global settings. This whole feature that is build into sermon distributor. [00:12:56](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m56s) You can look at these things in this list view. All the Dropbox information is there. There is some 'global' like, 'local folder', 'download link'.
To add fields to the config area, you need to add the field to fields. [00:11:07](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m07s) Go to fields; whatever field you want to use you need to create here. (See video.) Now you need to remember the system name that you're using so that when you open up this you would be able to type in the name and it will be selected. By convention as long as you use the same tab name it will be bundled in the order of which you set it here. [00:11:40](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m40s) It is in the Dropbox area where all their fields are being set. The reason why we include this demo component into the application with the tutorial is that you can see that he's using 'Dropbox update method' here. [00:12:00](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m00s) You can go look at this file. If you click it, it starts an update. [00:12:23](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m23s) It' There is some 'global' like, 'local folder', 'download link'.s not that simple to do that because we are not inside of our component, we are in the config component in the global if you have global settings. [00:12:56](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m56s) You can look at these things in this list view. All the Dropbox information is there. (See video.)
### Spacer HR Field In Component Fields
Then there is 'spacer hr'. [00:13:24](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m24s) You can see that I have that 'spacer hr' quite often. It's a field that will be included in the paid version of component builder. It already has that 'spacer hr' in it, since you can use the same spacer over and over. The system automatically increment it, it doesn't have conflict in name conventions. I'm just using the same spacer every where. Putting spacers which is this little line [00:14:01](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m01s) you see that line there. It's very small but it gives a space between these areas. That is why I'm doing that. You can also put default values which will be used during installation of the component. If you have switches in your config that you want to populate with default values, you should just add those values here. [00:14:27](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m27s) Then during the install, those values will be added to the database and component builder puts all that in place for you. This(see video) is where you add the config fields.
'Spacer HR.' [00:13:24](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m24s) You'd see 'spacer hr' quite often. It's a field that will be included in the paid version of component builder. It has 'spacer hr' in it, since you can use the same spacer over and over. The system automatically increment it, so that it doesn't have conflict in name conventions. Putting spacers which is this little line. (See video.) [00:14:01](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m01s) It's very small but gives a space between these areas. You can also place default values which will be used during installation of the component. If you have switches in your config that you want to populate with default values, you should add those values here. [00:14:27](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m27s) During the install, those values will be added to the database and component builder puts it in place for you. This is where you add the config fields. (See video.) [00:14:51](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s)
### Tab - View Names Fields added to Site Menu
[00:14:51](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) I added a convention that is not that obvious. If you use a tab name, which is exactly the same as a front end view then it will add this field to that front end views menu.
[00:15:13](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m13s) If you think about Joomla's Content Manager, it does the same thing. In the global setting of your article manager you can set features for categories and articles. But if you create a new article in a menu item, then you can overwrite those, you can say use 'global' or you can overwrite them.
I added a convention that isn't that obvious. If you use a tab name, which is the same as a front end view, then it will add this field to that front end views menu. [00:15:13](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m13s) Joomla's Content Manager does the same thing. In the global setting of your article manager you can set features for categories and articles, but if you create a new article in a menu item, you can use 'global' or overwrite them.
The feature of using the same tab name is 'preacher/ switch' whether it should be a table or a grid. [00:15:48](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m48s) We set the default 2, and called it preachers plural. That is quite important. Let's look at the front. There is a bunch of menus. [00:16:09](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m09s) Go to a menu that I've already created called 'preachers' then go to the components back end called 'preachers'. You see there is a list of items. I added the name 'preacher' as a tab name in the component builder.
This feature of using the same tab name,(See video) this features name is [00:15:48](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m48s) 'preacher/ switch' whether it should be a table or a grid. We set the default 2, and we called it preachers plural. That is quite important. Let's look at the front. Here I have a bunch of menus. [00:16:09](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m09s) I'm going to go to a menu that I've already created called 'preachers' and I'm also going to go to the components back end, called 'preachers'. So you see there is a list of items. All I did in the component builder, is I simply added, the name 'preacher' as a tab name. That's all I did and then the fields. There is the list of the fields(see video), from there to there. [00:16:41](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m41s) These fields I simply created in the field area with field types. It is some radio buttons, a drop down list, another drop down list, and again some radio buttons. These are the fields. Then in the view, if you click on sermon distributor, you will see those exact same fields. It has the option of using the global [00:17:07](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m07s) instead. There it says 'used global' or you can overwrite it. You can decide in this specific admin view if I want to use 'grid' and not the 'global' option.
Now the fields. There is the list of the fields. (See video.) [00:16:41](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m41s) These fields I created in the field area with field types. In the view, if you click on sermon distributor, you will see those exact same fields. It has the option of using the global instead of overwriting it. [00:17:07](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m07s) You can decide in this specific admin view if you want to use 'grid' and not the 'global' option.
That whole system of adding this extra features to every item view of the front end, is integrated simply by a convention. If the front end is called 'preachers' which in this case it is, as you can see there, it's called 'preacher', see I just selected a menu item called preachers. We haven't dealt with setting up your site views and all that so this might be [00:17:47](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m47s) how did you get that item name right in everything. But I'm trying to sketch a picture which we will revisit when we eventually get to this area. But just that you know from where it comes it's simply in the config. I added the files and used the convention of the actual front end page, it has a name called preachers, so there is the same for preacher which is single. [00:18:15](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m15s) If 'sermon distributor' is selected and then 'preacher', which is another view. If I click 'sermon distributor' all the switches will be mapped out. (see video) They have some default values . There are the [00:18:43](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m43s) fields. In the back end of the component, if I click on preacher, here is the same fields. You can set global settings and then you can overwrite them in the menu itself by not using global. This whole feature is possible through this config little tab. It looks insignificant I suppose [00:19:08](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m08s) and you might not expect it like I said it's not that obvious that it does this, but that is what it is doing and so as you can see all of those certain areas I have just mapped in config.
NB. Because of the name of the tab, the system knows this is related to any front end menus as well. Therefore it will automatically create those front end things for you.
The system of adding these extra features to every item view of the front end is integrated by a convention. I selected a menu item called preachers since the front end is called preachers. [00:17:47](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m47s) I added the files and used the convention of the front end page, so there is the same for preacher which is single. [00:18:15](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m15s) If 'sermon distributor' is selected, then select 'preacher', which is another view. If I click 'sermon distributor' all the switches will be mapped out. (See video.) They have some default values . [00:18:43](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m43s) There are the fields. If I click on preacher in the back end of the component, the same fields are found. You can set global settings and overwrite them in the menu by not using global. This feature is possible through this config tab. [00:19:08](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m08s) Because of the name of the tab, the system knows this is related to any front end menus as well. Therefore it will automatically create the front end things for you. [00:19:47](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m47s)
### Site View Explanation Of Above Tabs
Here is something about how Joomla API work [00:19:47](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m47s) At the front of this component, if the view , 'Preachers' is opened you will see in the template, there is a extra file called 'Default XML'. Then I'll open that 'default XML'. Now Component Builder adds the convention to this file. [00:20:18](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m18s)
(If you're running into troubles and it's not working as you expected, this is the file in which you can come and look to see what is wrong. That is in the front end. In views. In the specific view that you have, it must be this view, must be the tab name. In that file called 'default XML')(See video). [00:20:41](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m41s)
At the front of this component, if the view 'Preachers' is opened you will see an extra file called 'Default XML' in the template. Open 'default XML'. Now Component Builder adds the convention to this file. [00:20:18](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m18s) (If it's not working as you expected, this is the file in which you look to see what is wrong. In the specific view that you have, it must be this view and the tab name in the file called 'default XML.') (See video). [00:20:41](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m41s)
### Quick Explanation Of Creating Site Views
This is important since we haven't dealt with adding site views. This site views here, I need to quickly touch on it, that you at least know something that relates to this. That is if you didn't click on 'add' as a menu. If you sets it to 'no' then that file will not exist. That file only exist if this is set to 'yes'. So setting it to 'yes', [00:21:11](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m11s) tells component builder to build this default XML file, and setting the tabs to the same name as this view, tells component builder to add those fields to this field and make it so that your user can then have unique implementation. This is important. [00:21:34](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m34s) It doesn't make use of this information necessarily inside of your site view. You need to make use of this information in your site view.
Since we haven't dealt with adding site views I will quickly explain it here so that you at least know something that relates to this. If you didn't click on 'add' as a menu, set it to 'no,' and the file will not exist. It only exist if this is set to 'yes'. [00:21:11](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m11s) Setting it to 'yes' tells component builder to build this default XML file, and setting the tabs to the same name as this view tells component builder to add those fields to this field. It will create it so that your user can have unique implementation. This is important. [00:21:34](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m34s) It doesn't make use of this information necessarily inside of your site view. You need to make use of this information in your site view.
## Using Of Parameters
### Using Of Parameters
If you're a developer you would know that inside of your component, you have [00:21:56](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m56s) a place where you check the params header. Should it show, then it shows it and you are getting it from the parameters. The parameters are set inside of the 'view.html.php'. Here we set the parameters( See video). We do this 'app- get params'. This actually gets all the parameters in relation to this view. It gets that component parameters, it gets the menu parameters, and it automatically, [00:22:33](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m33s) if they've used global, it will automatically fall back on what is set here. Which is excellent. So you're using the same name, display and display. It's the same name. If you are using global, what parameters does, it's getting this place, parameter. [00:23:02](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m02s)
If you're a developer you would know that inside of your component, you have a place where you can check the params header. [00:21:56](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m56s) The parameters are set inside of the 'view.html.php'. Here we set the parameters. (See video). This gets all the parameters in relation to this view. It gets the component parameters and the menu parameters, and, if global had been used, automatically fall back on what is set here. [00:22:33](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m33s) So you're using the same name, display and display; if you are using global parameters gets this parameter. [00:23:02](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m02s) The display field is getting that parameter. It looks at the 'menus settings,' set to global, and it automatically falls back to the global settings. This means that by using params and doing a check-up this value is inside of 'this params. [00:23:34](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m34s) Go to the default view; 'preacher display'. That's the field name in the global configurations. (See video.) [00:24:03](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m03s) If I were to go and open this field you'd see the list of the 'switch preachers' fields in the fields tab. [00:24:37](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m37s) Open that specific field and see that the name of this field is 'preachers_display'. [00:24:56](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m56s) It is quite important that none of the fields have the same name. Every field in this global area must be unique.
The display field is getting that parameter. It first looks at the 'menus settings' and that one(See video) is set to global, it automatically falls back to the global settings. It's just the way Joomla works, which is excellent. That means that by using params and then doing a check-up. This value is inside of 'this params' [00:23:34](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m34s) and going to the default view and see some of the implementing of that. Going to 'preacher display'. That's the field name in the global configurations. [00:24:03](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m03s) What we used for this field was - 'switch preacher tablegrid'. It's called 'preacher display'. If I was to go and open this field you see the whole picture, 'switch preachers tablegrid'. Here is the list of the 'switch preachers' [00:24:37](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m37s) fields. In the fields tab (See video). I'll open that specific field and see that the name of this field is 'preachers_display'. [00:24:56](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m56s) NB. It is quite important that none of the fields have the same name. What is meant by none of the fields, is that this 'preacher' field must not have the same name as that 'plain' field. Every field in this global area must be unique. That is why I use the convention of 'preachers display' so that I can also use 'preacher' without the 's' 'display' and I can use [00:25:25](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m25s) 'category_display' so that I have that side of convention of implementation. If you are a developer always keep the concepts of conventions logical, repetitive and scalable. For instance here is one that I have added. It's that specific item. In the global area go to 'preachers'. It is this field here(See video)'Display - Table - Grid - List' [00:25:59](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m59s) and in the code, if preacher_display = 1, then show the table. If preacher_display = 2, then show the grid. If non is selected then show the list. Which is the three options if you look at the button. The button has 'table grid list'. [00:26:21](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m21s) I'm not asking does the global have this or that, none of that, I'm just calling the field directly, because the way that Joomla gets that initial data like I showed you here, Joomla sorts that out for you. That's quite nice. I've tested it and made sure that my explanation is correct. It is the same when it comes to 'colors'. Just going about like this 'this.>params.>get('preachers_tables_color') colors. [00:26:55](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m55s) I'm just showing to you how component builder makes it easy to implement these kind of things. Which otherwise would take so much time to write this up and then make sure it's exactly the same inside of the XML folder menu and so forth. Component Builder does all of that out of this config file simply with a convention that relates to the actual front end. [00:27:26](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m26s)
If you are a developer, always keep the concepts of conventions logical, repetitive and scalable. Here is one that I have added for instance. In the global area go to 'preachers'. It is this field here, 'Display - Table - Grid - List' and in the code, if preacher_display = 1, then show the table. [00:25:59](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m59s) If preacher_display = 2, then show the grid. If non is selected then show the list. [00:26:21](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m21s) I'm not asking does the global have this or that, I'm just calling the field directly, because Joomla gets that initial data and sorts it out for you. I've tested it and made sure that my explanation is correct. The same goes when it comes to 'colors'. (See video.) [00:26:55](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m55s) Component builder makes it easy to implement these kind of things which otherwise would take time to write and then make sure it's the same inside of the XML folder menu, etc. Component Builder does all of this out of the config file with a convention that relates to the actual front end. [00:27:26](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m26s)
Possibly it might be ideal for us to [00:27:48](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m48s) stop here with the component and go look at setting up a custom admin view or setting up a site view.The ideal will be to first deal with some of this component features and finish that [00:28:12](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m12s) and as soon as we've finished it, we'll go into the custom area of your front-end development and custom admin development and then we'll be relating back to what we have discussed as we continue. So I've now looked at the setting tab and try to cover as much of this area as poosible. I have not mentioned much about 'MySQL' tweak. This is a very advanced feature and [00:28:44](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m44s) You're able to exclude dummy data through this area so that if you have different versions you will through this 'MySQL' tweak be able to exclude certain information.It is a little bit advanced and in many case are not going to be used. It's only when you start having multiple versions of the same extension and you are marketing them at different prices and want to be able to [00:29:17](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m17s) from within component builder just export the different versions then you start using this feature and I think we possibly deal with it with when we start looking at more advanced implementations. We'll start in the next run with scripts