Updated 4a. JCB Demo Component Directory, Folders and Files (markdown)

Joseph Geller
2018-09-27 05:38:21 -05:00
parent 4e9f601c4d
commit 68812439b0

@@ -306,11 +306,11 @@ Let's look at the code behind all of this. By default, the site view looks is no
* Looks (Site) Access Allowed
* Looks Edit Own Allowed
The first option only allows access to the site. The view will display a look but that's all. The second allows access and therefore all looks will display and can be accessed (but not edited) as long as the third access is also granted. The fourth allows editing the look if the user's id matches the one in the look_demo table record More details on th Joomla! ACL on this can be seen in [the video at](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=36).
The first option only allows access to the site. The view will display a look but that's all. The second allows access and therefore all looks will display and can be accessed (but not edited) as long as the third access is also granted. The fourth allows editing the look if the user's id matches the one in the look_demo table. record More details on the Joomla! ACL on this can be seen in [this video](https://www.youtube.com/watch?v=gWjQjdhYqXI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=36).
There is a caveat in the demo that must be taken into consideration. From the admin area of the site, main menu option Selecting the Components, Component Builder, Dynamic Gets, Looks, Tweak option you must add the Filter:
Where Table Key a.created_by equal = $this->user->id
* Where Table Key a.created_by equal = $this->user->id
This Tweak to the Dynamic Get in JCB for the Demo component site view looks Dynamic Get, getListQuery extends it to only include records from the table that are created by the user having the same id as the current user, available from the site view looks $this variable, user id element in the form. The change takes effect once you use JCB to compile the component and install it again using the Joomla! extension installer. The same Tweak is required in the site view looking Dynamic Get, getItem.