Updated 051 Dynamic Router Implementation Explained (markdown)
parent
c6802b007a
commit
1c3515ac49
@ -51,19 +51,19 @@ To illustrate this within the JCB interface. With this new dynamic implementatio
|
||||
|
||||
[00:08:19](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m19s)
|
||||
|
||||
Let us return to the interface to show where the changes can be made to have the `category` rendered correctly as well as the `preacher` and the `series`. Basically, make the changes so that `sermon` will say `series`, and this one will say `true`, and this one `preacher` would also say, `preacher`.[00:08:48](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m48s) That is all that needs to be done and the router will work without any errors. Here in the interface, are the Site Views that need to be changed, which are Preacher, Series and Category. [00:09:15](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m15s) If Preacher is opened, you will see that it has a Dynamic Get called 'Sermons' (preacher id) and it is a (getListQuery). This is the one that should be changed. [00:09:35](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m35s) The Dynamic Get, as well as Series', the same applies to that. There are Sermons (series id) (getListQuery) that also need to change. It is not changed in the view. The idea was that if it gets changed in the Dynamic Get it will automatically write the correct code to whatever view is added because we have added some Custom Placeholders within the script.
|
||||
Let us return to the interface to show where the changes can be made to have the `category` rendered correctly as well as the `preacher` and the `series`. Basically, make the changes so that `sermon` will say `series`, and this one will say `true`, and this one `preacher` would also say, `preacher`.[00:08:48](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m48s) That is all that needs to be done and the router will work without any errors. Here in the interface, are the Site Views that need to be changed, which are Preacher, Series, and Category. [00:09:15](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m15s) If Preacher is opened, you will see that it has a Dynamic Get called 'Sermons' (preacher id) and it is a (getListQuery). This is the one that should be changed. [00:09:35](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m35s) The Dynamic Get, as well as Series', the same applies to that. There are Sermons (series id) (getListQuery) that also need to change. It is not changed in the view. The idea was that if it gets changed in the Dynamic Get it will automatically write the correct code to whatever view is added because we have added some Custom Placeholders within the script.
|
||||
|
||||
### Sermon (series id) - Heads Up For Placeholders
|
||||
|
||||
[00:10:06](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m06s)
|
||||
|
||||
The first one is Sermon (series id). In Custom Script scroll down to the bottom, there is a new tab option here, Add PHP (parse Method)-in Router'. [00:10:29](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m29s) Click 'Yes', and it will dynamically load what can be considered the most basic implementation of that short snippet. It looks very familiar, it got these placeholders. It has a specific sview placeholder because we are dealing with the Site View and it has to have this 's' in it to replace it with the site view name. [00:10:55](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m55s) So wherever this is going to be used, this Dynamic Get would be replaced with that specific site view's value. That's just to give you a heads up about the placeholder and that's what makes it dynamic, that you can use it in any site view and it will automatically write this. Because the display of the page is based on the database request. Which is built in the URL by the name of the view. As well as the ID of the element. If multiple variables are being passed [00:11:32](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m32s) to the URL, you can update that and replace multiple values. Here we want to within this one, the default option here will resolve our issue because remember these two values were not the same.
|
||||
The first one is Sermon (series id). In Custom Script scroll down to the bottom, there is a new tab option here, Add PHP (parse Method)-in Router'. [00:10:29](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m29s) Click 'Yes', and it will dynamically load what can be considered the most basic implementation of that short snippet. It looks very familiar, it got these placeholders. It has a specific sview placeholder because we are dealing with the Site View and it has to have this 's' in it to replace it with the site view name. [00:10:55](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m55s) So wherever this is going to be used, this Dynamic Get would be replaced with that specific site view's value. That is to give a heads up about the placeholder and that is what makes it dynamic, that you can use it in any site view and it will automatically write this because the display of the page is based on the database request which is built in the URL by the name of the view as well as the ID of the element. If multiple variables are being passed [00:11:32](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m32s) to the URL, you can update that and replace multiple values. In this one, the default option will resolve the issue because remember these two values were not the same.
|
||||
|
||||
### JCB Change sview to sermon
|
||||
|
||||
[00:11:56](https://www.youtube.com/watch?v=hYycPLbaMos&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m56s)
|
||||
|
||||
JCB's dynamic build changed sview value to sermon instead of leaving it the same. There is a very good reason for that. Usually, this would be the correct response but in this case because of complexity, I'm not going to explain it, isn't the correct response and so you want these two values to be the same and it is the site view's name. We could just save it close.
|
||||
JCB's Dynamic Build changed 'sview' value to Sermon instead of leaving it the same. There is a very good reason for that. Usually, this would be the correct response but in this case, it was not. (Due to its complexity, I am not going to explain it), so you want these two values to be the same and it is the site view's name. We could just save it close. <<<<<<<
|
||||
|
||||
### Sermon (Preacher id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user