diff --git a/010-Component-Settings.md b/010-Component-Settings.md index de5f814..381af75 100644 --- a/010-Component-Settings.md +++ b/010-Component-Settings.md @@ -68,12 +68,6 @@ This is important since we haven't dealt with adding site views. This site views 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) -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 sight of convention of implementation. You should all around as you develop think about conventions using sort of logical repetitive scalable concepts.<<<<<<<<<<<<<<<<<< +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) - - - - - <<<<<<<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 +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