From 521c001852b750226c76f309c8d38f16f13692bd Mon Sep 17 00:00:00 2001 From: "((ewe))yn" Date: Wed, 5 Jun 2019 13:35:52 +0200 Subject: [PATCH] made title linkable --- 010-Component-Settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/010-Component-Settings.md b/010-Component-Settings.md index 98667b4..3f98ef1 100644 --- a/010-Component-Settings.md +++ b/010-Component-Settings.md @@ -53,7 +53,7 @@ Now to show you how it is done it's quite simple. [00:19:47](https://www.youtube 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** +## 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.