Updated 031 Automatic import of custom code during compilation in JCB (markdown)
parent
a234a194fb
commit
06c98762ff
@ -8,18 +8,18 @@ A very smart new feature has lately been added to Component Builder that's calle
|
||||
|
||||
The feature is there for those who are used to coding in another editor. For example, they create a component in Component Builder, then once it is created, they do a compile and install it onto the same website as Component Builder to test it. [00:01:13](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m13s) Then during testing, code is added into that compiled version that are installed onto the website. The new feature is able to, on compilation to extract that custom code , store it in this custom code area, and add it back into the component on the fly. Since there are some limitations, a demonstration of some rules and guidelines is necessary. [00:01:45](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m45s) This is still in beta and quite a few improvements still need to be done. I would like it to be tested and would appreciate some feedback from you.
|
||||
|
||||
* ### Example Demonstration Compiled
|
||||
|
||||
I'm going to compile the demo component since most of you might already have this component installed and can then use this as sort of a test area. I'm going to install it on to this current site and explain how to add custom scripting to that component by going to an editor.
|
||||
[00:02:28](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m28s)
|
||||
|
||||
### Editing Code In The Editor
|
||||
|
||||
Here in the editor can this root directory of the website be seen. Something is going to be done on the back end of the components. Open administrator, components and then the demo component. To demonstrate, on the main index page some custom scripting is added. [00:03:04](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m04s) There are some conventions and regulations that should be considered when the way to add custom scripting is explained<<<<<<<<
|
||||
Here in the editor can this root directory of the website be seen. Go to the back end of the components. Open administrator, components and then the demo component. To demonstrate: On the main index page some custom scripting is added. [00:03:04](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m04s) There are some conventions and regulations that should be considered when the way to add custom scripting is explained.
|
||||
|
||||
### Conventions Used(Insert Code - Replace code)
|
||||
|
||||
Let me first show you the conventions. To insert custom scripting you will use a tag like so(see video). You will use asterisks(*) instead of the X's that are in the code. The code has the X's in it but the actual way would be with the asterisks(*). So that will be to insert a new code. You use that place holder(///***[INSERT<>$$$$]***///) in the beginning of the area, then after a new line, you will insert your code, and then at the end of the code, you will insert this one(///***[INSERT<>$$$$]***///), to close the code. [00:03:50](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m50s) Then there are two ways of adding code. One is to insert code and one is to replace existing code. So inserting code would simply at the same line insert that code into the existing code, where is replacing code will literally remove the old code and add the new code in its place, So these are the two conventions. Once component builder adds the code back, the tag will change to inserted, and will have this new number at the end. This number is referencing the id of the [00:04:28](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m28s) code in the system. Now don't ever change this number or component builder would think that it doesn't have one, and it needs to be created. It will be an error. It won't work, so don't take this number out. It will add this at the end. After compiling it and adding this string in, it won't compile it again, because of these opening and closing [00:04:56](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m56s) brackets not being there and the greater and lesser than signs. They are the ones that activate it and makes it be parsed again. When component builder places the code back, it looks like this(///***[INSERT<>$$$$]***///). When you then later come and want to change it again you would add this diamond(<>) in there, and it will then update the existing code in the database with the changes that you've made. [00:05:30](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m30s)
|
||||
Let me first show you the conventions. To insert Custom scripting you will use a tag like this(see video). You will use asterisks(*) instead of the X's that are in the code. The code has the X's in it but the actual way would be with the asterisks(*). So that will be to insert a new code. Use that place holder(///***[INSERT<>$$$$]***///) in the beginning of the area, then after a new line, insert the code, and then at the end of the code, insert this one(///***[INSERT<>$$$$]***///), to close the code. [00:03:50](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m50s) There are two ways of adding code. One is to insert code and one is to replace existing code. So 'insert' code would simply at the same line insert that code into the existing code, where is 'replace' code will remove the old code and add the new code in its place, So these are the two conventions. Once Component Builder adds the code back, the tag will change to 'inserted', and will have this(23) new number at the end. [00:04:28](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m28s)This number is referencing the id of the code in the system.
|
||||
|
||||
NB. Do not change this number. Component Builder would interpret that it does not have one, and it needs to be created. It will be an error. It will add this at the end. After compiling it and adding this string in, it won't compile it again, because of these opening and closing [00:04:56](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m56s) brackets not being there.(Greater and Lesser than signs). They are the ones that activate it and makes it be parsed again. When Component Builder places the code back, it looks like this(///***[INSERT<>$$$$]***///). If it needs to be changed at a later stage, just add this diamond(<>), and it will then update the existing code in the database with the changes that had been made. [00:05:30](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m30s)<<<<<<<<<<<<<<<<<<<<<<
|
||||
|
||||
### Limitations For Inserting And Updating
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user