Updated 049 The New Library Manager Area (markdown)

Amigo committed 2019-07-12 16:30:14 +02:00
1 parent 2128707d18
commit 4d51d629d6
1 file changed
+6 -2
+6 -2
@@ -69,5 +69,9 @@ Let me show you that quickly. You can go to Snippets, you don't really need to g
Let's go back to Site Views. Again open the Looks area. If I select in Libraries, Bootstrap [00:17:05](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m05s) then you'll see those two Snippets that I've installed and I can click between them. That's just for you to get the snippet and to be able to add it into your code wherever you would like it to be. I'm going to do that.
### Adding The Library
??
I'm just going to demonstrate adding the library. Selecting the Library, [00:17:29](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m29s) is what will add the Library to the Component and to this View. You can select multiple Libraries for one View. But there could be a problem with that if you for example want Uikit v2 and Uikit v3 on this page but you want to have it Only use the one or the other based on certain switches in the global options of the component Now Uikit version 2 was set to fall back to the internal Build-in option [00:18:04](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m04s) And Uikit Version 3 was said to fall back to Always add So if we just look at that Ok so that's Always Add and Built-in Now you want to Actually have both libraries under the page But you wanted to work within some custom implementation the way to do that is to click on new And use the bundle option [00:18:32](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m32s) Select Those two libraries Like that Decide how you want to do it so it will be possibly a custom script Or it will be a conditional one Which you will then have to create Obviously let me just say this So we could call those Uikit Bundle Let's call it Uikit like that [00:19:06](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m06s) And save Now Once you've saved it once You should now add the actual files So You would go to folders And then At Uikit 3.... wrong button Uikit 3 and Uikit 2 [00:19:39](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m39s) ......... And you wanna add them to the media folder So You'll have to still link the files remember selecting those libraries Doesn't inherently clone it's Files You'll need to still manually add the files so now we've got version 3...... Why is this so difficult here we go [00:20:07](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m07s) The screens not working along here Ok you like it Version 3 and version 2 And save and close So now We have The files And here they are as folders And it shows you all the files and folders That are found inside of those two folders that you've added So [00:20:35](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m35s) Yeah I think it's little difficult you cannot see which version is which here This might be a A good option to add Maybe the folder the name here I think that will be In the next release we will make that change But I think the other option which is also ideal for this kind of implementation is a custom scripting Which you could still create The the the configed files Fields excuse me [00:21:04](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m04s) So when it when it's this Uikit version 2 is selected it will load the Uikit version 2 files But you must understand if you create the buttons it will be added to the component But if you use custom script And in here in the behaviour you write the custom script You need to Let me just show you in the file So in the file You see that it actually puts the parameters [00:21:36](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m36s) In params this params So You will need to down here Get The Uikit The switch the the button name That you now Have created to the configed fields You then get the value put it into a variable And then based on that variable [00:21:59](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m59s) You would either Add the file or not add the file So you'll basically write this script If I was to Just copy this is an example All the way up there And go here paste This is basically what the custom script should look like But that means that you created In the library config you created buttons [00:22:30](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m30s) With those names right And that the values are related to these values here The HeaderCheck option Is something that if you go into the file you go look at the PHP you might understand how to Use this And so the HeaderCheck at this stage always being loaded If you don't wanna use the edit check then you just you know just don't use it But you could go and and try and figure out how the HeaderCheck works And then use it [00:23:06](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m06s) anyway so that is Making a bundle Now let me save this as an example And so now we got this Uikit And it's a bundle If we go back to the site View And we open that up again We will now instead of creating this one and that one we will just create Select that bundle Line truncated
I'm just going to demonstrate adding the library. Selecting the Library, [00:17:29](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m29s) is what will add the Library to the Component and to this View. You can select multiple Libraries for one View. But there could be a problem with that if you, for example, want Uikit v2 and Uikit v3 on this page but you want to have it only use the one or the other, based on certain switches in the global options of the component.
### Uikit v2 Set To Fall Back To Build-in Option, Uikit v3 Set To Fall Back To Always Add
???
Uikit v2 was set to fall back to the internal Build-in option, [00:18:04](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m04s) and Uikit v3 was set to fall back to Always Add. If we just look at that, Uikit v3 - Always Add and Uitkit v2 - Build-in. You want to have both Libraries unto the page, but you wanted to work within some Custom Implementation. The way to do that is to click on New and use the Bundle option. [00:18:32](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m32s) Select those two libraries, Uikit v2, Uikit v3, like that. Decide how you want to do it. It will be possibly a Custom Script or it will be a Conditions one. Which you will then have to create. let me just say this So we could call those Uikit Bundle Let's call it Uikit like that [00:19:06](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m06s) And save Now Once you've saved it once You should now add the actual files So You would go to folders And then At Uikit 3.... wrong button Uikit 3 and Uikit 2 [00:19:39](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m39s) ......... And you wanna add them to the media folder So You'll have to still link the files remember selecting those libraries Doesn't inherently clone it's Files You'll need to still manually add the files so now we've got version 3...... Why is this so difficult here we go [00:20:07](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m07s) The screens not working along here Ok you like it Version 3 and version 2 And save and close So now We have The files And here they are as folders And it shows you all the files and folders That are found inside of those two folders that you've added So [00:20:35](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m35s) Yeah I think it's little difficult you cannot see which version is which here This might be a A good option to add Maybe the folder the name here I think that will be In the next release we will make that change But I think the other option which is also ideal for this kind of implementation is a custom scripting Which you could still create The the the configed files Fields excuse me [00:21:04](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m04s) So when it when it's this Uikit version 2 is selected it will load the Uikit version 2 files But you must understand if you create the buttons it will be added to the component But if you use custom script And in here in the behaviour you write the custom script You need to Let me just show you in the file So in the file You see that it actually puts the parameters [00:21:36](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m36s) In params this params So You will need to down here Get The Uikit The switch the the button name That you now Have created to the configed fields You then get the value put it into a variable And then based on that variable [00:21:59](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m59s) You would either Add the file or not add the file So you'll basically write this script If I was to Just copy this is an example All the way up there And go here paste This is basically what the custom script should look like But that means that you created In the library config you created buttons [00:22:30](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m30s) With those names right And that the values are related to these values here The HeaderCheck option Is something that if you go into the file you go look at the PHP you might understand how to Use this And so the HeaderCheck at this stage always being loaded If you don't wanna use the edit check then you just you know just don't use it But you could go and and try and figure out how the HeaderCheck works And then use it [00:23:06](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m06s) anyway so that is Making a bundle Now let me save this as an example And so now we got this Uikit And it's a bundle If we go back to the site View And we open that up again We will now instead of creating this one and that one we will just create Select that bundle instead And that bundle will give me [00:23:32](https://www.youtube.com/watch?v=rDjvgLYOt1o&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m32s) Uikit version 2 snippets it and if we have any version 3 snippets installed it will also load that for me So I will be able to work with both libraries Why selecting is bundled Library option and JCB when it compiles He will basically use the custom script that you wrote in the Bundler To add it to the view so let me Show you that so I'll save and close here And let's goLine truncated