Updated 017 Layout Setup (markdown)

Amigo 2019-06-20 10:52:10 +02:00
parent 41c1c9cbae
commit 2f272298ea

@ -39,17 +39,12 @@ Where is it getting these values? [00:07:20](https://www.youtube.com/watch?v=52O
### Layout Concept
The layout concept is more or less the same as with templates.[00:09:27](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m27s) It has a layout area in which you put your script and here (see video) the key replacing is used. If certain dynamic gets are selected , the liberty is taken of showing that we are starting with display data. But this snippets here(see video), might not correspond to what you're doing because you can really pass anything to a layout. We are just assuming that if you're using that dynamic get, you possibly passing it in this way or that way. [00:10:06](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m06s) You can't copy and paste this necessarily. At least you can know when you look at a specific dynamic get, that that are the values in it and how you can try figure out which ones to use. This again will be only really something you can use if you are actually aware of that PHP will do the implementations. [00:10:34](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m34s) If you are not familiar with it, it is not necessary to use layouts. The whole front end may be build in the site view. It will work although it might be a lengthy script. Layouts and templates has been added simply for convenience. <<<<<<<<<<<<<<<<<<<<<<
The layout concept is more or less the same as with templates.[00:09:27](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m27s) It has a layout area in which you put your script and here (see video) the key replacing is used. If certain dynamic gets are selected , the liberty is taken of showing that we are starting with display data. But this snippets here(see video), might not correspond to what you're doing because you can really pass anything to a layout. We are just assuming that if you're using that dynamic get, you possibly passing it in this way or that way. [00:10:06](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m06s) You can't copy and paste this necessarily. At least you can know when you look at a specific dynamic get, that that are the values in it and how you can try figure out which ones to use. This again will be only really something you can use if you are actually aware of that PHP will do the implementations. [00:10:34](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m34s) If you are not familiar with it, it is not necessary to use layouts. The whole front end may be build in the site view. It will work although it might be a lengthy script. Layouts and templates has been added simply for convenience.
### Layout Custom Script Area
Begin at layouts you have the same concept of adding custom scripting. Which will be placed in the head of the file. Remember that your global data or the data being passed is in [00:11:14](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m14s) display data. Here again you have your html area. But you can jump into php and check some values and on the basis of that, do your certain implementations. That is really setting up a layout.
In layouts is the same concept of adding custom scripting which will be placed in the head of the file. Remember that the global data or the data being passed is in 'display data' [00:11:14](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m14s) This is a HTML area but you can go into PHP and check some values and on the basis of that, do the necessary implementations. That is setting up a layout.
### A Note: Use Layout in a Layout
Just another note you can actually use a layout in a layout. You can pass values, any value you like. [00:11:42](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m42s) I realized that 'this' here is maybe not that appropriate. You need to keep a heads up for that. This doesn't exist on the layout page. You need to use the display data as the global or as the main object from which to start your implementation.
A layout can be used in a layout. You can pass any value. [00:11:42](https://www.youtube.com/watch?v=52OLSZio0F8&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m42s) Keep in mind that 'this' does not exist on the layout page. The display data needs to be used as the 'global' or as the 'main object' from which to start your implementation.