From b908825fc3e7266c73a9dbe601c897f6e50b0751 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Tue, 28 May 2019 17:00:23 +0200 Subject: [PATCH] Updated 010 Component Settings (markdown) --- 010-Component-Settings.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/010-Component-Settings.md b/010-Component-Settings.md index 649a1ee..4566c36 100644 --- a/010-Component-Settings.md +++ b/010-Component-Settings.md @@ -16,8 +16,26 @@ This custom admin menu is basically what I use to the map the compiler menu. I w **Adding Custom Config Fields** -I also want to quickly cover 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. 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. All of these switches are done in the config area. All of them except some of these default switch. Is added by to the simple switches. +I also want to quickly cover 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. 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. + +**Custom Switches Using Sermon Component** + +All of these switches are done in the config area. All of them except some of these default switch. Is added by to 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 also set, how many records should be set. If zero then all versions will be saved. This is the version control. + +**Adding Contributors** + +The author areas is also added automatically. When you click in the component here, [00:09:40](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m40s) you will see here is 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. Those involved with developing your component and then the amount of empty ones you want to leave there. Its also tweakable. That'll basically, let me show you, add this area here 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, and also the permissional structure is added automatically. + +**Adding UIkit** + +And if you have in the component you can actually set that it includes UIKit, you can 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(The parameters for uikit are set here) 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. + +**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) 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** + ??? - -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 also said how many You know records should be set if zero Then all versions will be saved So this is the version control And then The author Areas also added automatically And you can when you click in the component here just close this thing [00:09:40](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m40s) You see here is a contributing in area you can set whether you want add empty contributing level The fields Here you can add contributors as many as you like Those involved in developing the component And then the amount of empty ones you want to leave there Is also Tweak able And that'll basically Let me show you add this area here Contributor 1234 [00:10:09](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m09s) And When you use this witch IT controls whether it's been shown in the back or the front of all these kind of features Which I am not gonna go into much depth now But they also added automatically on also the permissional and structure is added automatically And if you have in the component You can actually Set that it includes UiKit you can said to that: yes If you do that [00:10:37](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m37s) it automatically adds This feature to your component And every where where Uikid is used Ok so everything else this Dropbox preachers preacher categories category Series list and series and sermons Is all done through that Config area here Now to use 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) So you would you go to fields And whatever field you wanna use there you need to create here So you first create the fields Then obviously you need to remember the system name that you're using Because then when you open up this 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 said it here [00:11:40](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m40s) So this is where the Dropbox Area All there Fields are being set Now the reason why we include this Demo Component Into the Application with the tutorial Is that you can go and look and see ok well he's using [00:12:00](https://www.youtube.com/watch?v=V2WkTjNFjvo&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m00s) Dropbox update method Here And Then you can go look at this file And then you can go look at And how it looks here The Dropbox update method And the files and the text and even Some of this 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 And it even shows it here Now how to do this is very tricky It's not that simple to do that because we not inside of our component as you can see were actually in the config Component In the global if you have Global settings So This whole feature that is building into sermon distributor is so smart I would tell you For you to be able to do that is just stunning So [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 the 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 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 +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