From 5a2f60896e9ed9d6d0d34dfee57b78d48d3568f9 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Wed, 29 May 2019 15:34:28 +0200 Subject: [PATCH] Updated 010 Component Settings (markdown) --- 010-Component-Settings.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/010-Component-Settings.md b/010-Component-Settings.md index 4566c36..564b49e 100644 --- a/010-Component-Settings.md +++ b/010-Component-Settings.md @@ -34,8 +34,25 @@ And if you have in the component you can actually set that it includes UIKit, yo 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) This is where the Dropbox area all there 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!) I mean here is a button. 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, were actually in the config component in the global if you have global settings. This whole feature that is build into sermon distributor is so smart I would tell you For you to be able to do that is just stunning. [00:12:56](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m56s) You can look at how I've done that by simply going to these fields and you would find the answer to how did he do that. And you can look at these things in this list view. All the Dropbox information is there. And then there is some global like, local folder, download link. -**Space HR Field In Component Fields** +**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 it will be included in the paid version of of component builder. It already has that spacer hr in it. And since spacers, 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. Then also he can 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. -??? -And then space hr [00:13:24](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m24s) You can see that I have that Space HR quite often it's a It's a field that it will be included in the Paid version of of component builder It already has that spacer hr in it And since Spacers you can use the same spacer Over and over the system automatically increment it so it doesn't have conflict in name conventions So I'm just using the Same Spacer so every where is putting spacers which is 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 very Very small but it gives a space between these areas That is why I'm doing that Then also he can put default values which will be used during Installation of the component So if you have Switches in your config That you want to populate with default values should just add those values here [00:14:27](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m27s) And then during the install Those values will be added to the database and Component builder puts all that in place for you So this is where you add the config Fields And there is another Convention which is maybe Not Is not That It's not that obvious [00:14:51](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) But I added a convention that if you use a tab name Which is exactly the same As a Front-end View Then I will add This field to that front-end views menu Now [00:15:13](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m13s) If you can see it if you think about component sorry of Joomla's Content Manager manager It does the same thing In the global setting of your article manager you can set features for categories and for 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 now this feature Of using the same tab name So let's look at this The features name is [00:15:48](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m48s) Preacher Switch Whether should be a table or a grid Ok and we set the default 2 And we called it preachers plural That's quite important Now Let's look at the front Close this out here Do I have a bunch of menus [00:16:09](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m09s) I'm gonna go to a menu that I've already created called preachers And then I'm also gonna go to this components backend called preachers So you see there is a list of items now 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 So there is the list of the fields from there to there [00:16:41](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m41s) These are the fields you can see them here These Fields I simply created in the field Area With field type so is basically some radio buttons A drop down list Another dropdown list and again some radio button Ok so these are the fields And then in the view if you click on sermon distributor You see those exact same Fields and it has the option of using The global [00:17:07](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m07s) Instead so there's used global or you can overwrite it So you can decide ok this specific admin view I want to use grid and not the global option So 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 this case it is As you can see there it's called preacher see I just selected a menu item called preachers Now 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 to convention of the actual Front-end Page that has a name called preachers And So there is as well for preacher which is single [00:18:15](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m15s) So if I closed out select sermon distributor and then select preacher Which is another View And then I clicked here you see all these switches They also Mapped in here From there All the way to there And they have some default values in there there there are there [00:18:43](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m43s) Fields And in the back end of the component if I click on preacher Here is the same Fields so you can set Global settings And then you can overwrite them sorry in the menu itself Why not using Global So that this whole feature Is possible Through this config Little tab sorry 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 just mapped it in config And because of the name of the tab let me stress that Because of the name of the tab The system knows oh so this is related to any front end menus as well Therefore it will automatically create those front end Things for you Now to show you how it is done it's quite Simple [00:19:47](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m47s) Not that I want to teach you how The Joomla API works but I want you to at least know What is doing so I'm gonna go to the front of this component here it is And I'm gonna open that view preachers And you'd see in template there is a extra file called Default XML And then I'll open that default XML Basically all component builder is doing it is adding The convention to this file [00:20:18](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m18s) So 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's happening That is in the front end In views In the specific view that you have to it must be this view must be the The tab name And then In that file called default XML Obviously [00:20:41](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m41s) This is important Since we haven't dealt with adding site views The site views here I need to quickly touch on it so did you at least know Something that relates to this That is if you didn't click on add as a menu You sets its to no Then that file will not exist Ok so 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 Few and make it so that your user can then Have Unique Implementation obviously And 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 necessary inside of your site View You need to Make use of this information in your site view Now If you're a developer you would expect that right you would know Oh yeah ok so 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 params header Should it show then it shows it and it basically you getting it from the parameters The parameters are set inside of the view.html.php You see here we set the parameters We get We do on this app get parameters now this actually gets all the parameters in relation to this view The gets that component parameters it gets the menu parameters and it automatically If it has the custom [00:22:33](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m33s) So I feel like I'm maybe going Beyond the scope but if they've used Global It will automatically fall back on what the set here which is excellent So you're using the same name Display And display where is it It's the same name And so if you are using Global basically what parameters does Is it getting this place parameter [00:23:02](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m02s) The display field it's getting that parameter And it first looks at the menus Settings and that one is set to Global it automatically Falls back to the global settings That is done by Joomla itself it's not really something I build it's just the way Joomla works which is excellent And That means that you immediately By using params And then doing a check-up So remember now this value Is inside of this params [00:23:34](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m34s) And if I didn't go to the default View And let's see where am I implementing some of that Let's go to Here the preacher display Ok So the field name wasn't just display I'm sorry it was called preachers display That's the The field name In the global Configurations [00:24:03](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m03s) So You're not with me It is what we Used for this field Switch preacher Table grid It's called preacher display If I was to go and open this field in fact if you do that so if you see the whole picture Switch preachers table grid let me just remember that Ok here is the list of the switch preachers [00:24:37](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m37s) Fields as you can see I'm in the fields Tab And I'll open that Specific Field And you'd see that the name Of that The name Of this field is preachers Underscore display [00:24:56](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m56s) Now You need to make sure that none of the fields have the same name That is quite important What I mean by none of the fields I mean This field must not be the same name is that field Every field in this Global area must be unique It should never overlap So 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 Category [00:25:25](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m25s) Underscore display in you see so that I have that site of convention of implementation Is it all around as you develop think about conventions using sort of Logical repetitive scalable concepts And so this is one of them that I've done And then I just added it here It's that specific item And then in the Global area you go to preachers it is basically this view here Sorry field This field here [00:25:59](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m59s) And in the code On I'm simply saying If preacher = 1 Then show the table If Preacher display = 2 then show the grid And if non is selected and 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) And So 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 Is they sort that out for you and that's quite nice And I've obviously test it and made sure that my My explanation is the truth And so goes with the colours you can see here I I again just do params get colors But this is actually knowledge that you would have [00:26:55](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m55s) If you have developed a component for Joomla You would know about these tricks I suppose And I'm just showing to you how of component Build It 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 So 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) And that is as simple as that Ok so I think we have covered that Thoroughly enough And That will be all for this tutorial I will continue looking at more Concepts of the component And it's features 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 And yet I'm thinking you know if we go that route It's gonna take us on a very long Road so The ideal with me let me sort of Dealt with some of this component features First And finish that [00:28:12](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m12s) And then as soon as we've finished it We'll jump into the custom very Nice area of your front-end development and custom admin development And then we will obviously be relating back to what we have discussed here As we go So I've now looked at the setting tab And try to cover as much of this area as I can I didn't talk 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 can know that what it really does if we have dummy data You're able to Exclude them Through this area so that if you have different versions You will through this MySQL tweak Be able to exclude certain information Which I realise it's a little bit advance and so for most cases people will just not use this It's only when you start having multiple versions of the same extension And you selling them at different pricing 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 Ok thank you for watching We'll start in the next run with scripts +**Tab - View Names Fields added to Site Menu** + +And there is another convention which is maybe not that obvious, [00:14:51](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) but I added a convention that if you use a tab name, which is exactly the same as a front end view then I 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 for 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. This feature of using the same tab name, this features name is [00:15:48](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m48s) switch, preacher whether it should be a table or a grid. We set the default 2, and we called it preachers plural. That's 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 then I'm also going to go to 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. + +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 to convention of the actual front end page, it has a name called preachers. There is as well for preacher which is single. [00:18:15](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m15s) If I closed out, select sermon distributor and then select preacher. Which is another view. Then I clicked here(sermon distributor) you see all these switches. They are also mapped in here, from there all the way to there. They have some default values in there. 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 just mapped it in config. Because of the name of the tab, let me stress that, 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. + +**Site View Explanation Of Above Tabs** + +Now to show you how it is done it's quite simple. [00:19:47](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m47s) Not that I want to teach you how the Joomla API works but I want you to at least know what is it doing. I'm going to go to the front of this component. I'm going to open that view, preachers. And you'd see in template, there is a extra file called Default XML. Then I'll open that default XML. All what component builder is doing, it is adding 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's happening. 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. [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 necessary inside of your site view. You need to make use of this information in your site view. + +**Using Of Parameters** + +If you're a developer you would expect that right you would know 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 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. You see here we set the parameters. 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 if it has the custom, [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. And so if you are using global, what parameters does, its getting this place, parameter. [00:23:02](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m02s) The display field is getting that parameter. It first looks at the menus settings and that one is set to global, it automatically falls back to the global settings. That is done by Joomla itself. It's not really something I build. 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 then I go to the default view and let's see where am I implementing some of that. Let's go to here the 'preacher display'. The field name wasn't just display I'm sorry it was called preachers 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) If you're not with me it is what we used for this field - '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. As you can see I'm in the fields tab. I'll open that specific field. And you'd 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) You need to make sure that none of the fields have the same name. That is quite important. What I mean by none of the fields, I mean this(preacher) field must not be the same name as that(plain) field. Every field in this global area must be unique. It should never overlap. 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 in you see so that I have that site of convention of implementation. You should all around as you develop think about conventions using sort of logical repetitive scalable concepts. And so this is one of them that I've done. I just added it here. It's that specific item. And then in the global area you go to preachers. It is this field here(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. And 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. They sort that out for you. That's quite nice. I've tested it and made sure that my explanation is the truth. So goes with the colors. You can see here I again I do 'this.>params.>get('preachers_tables_color') colors. But this is actually knowledge that you would have [00:26:55](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h26m55s) if you have developed a component for Joomla. You would know about these tricks. 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) I think we have covered that thoroughly enough. That will be all for this tutorial. I will continue looking at more concepts of the component. And it's features. 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. Yet I'm thinking you know if we go that route, It's going to take us on a very long road so the ideal with me. Let me sort of Dealt with some of this component features first and finish that. [00:28:12](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m12s) And then as soon as we've finished it, we'll jump into the custom very nice area of your front-end development and custom admin development. And then we will obviously be relating back to what we have discussed here as we go. So I've now looked at the setting tab and try to cover as much of this area as I can I didn't talk 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 can know that what it really does if we have dummy data. You're able to exclude them through this area so that if you have different versions you will through this MySQL tweak. Be able to exclude certain information which I realize it's a little bit advance and so for most cases people will just not use this. It's only when you start having multiple versions of the same extension and you selling them at different pricing 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