Updated 038 Setup Site Edit View in JCB (markdown)
parent
94743f816f
commit
a519d82c2d
@ -6,7 +6,7 @@ Hi. I'd like to quickly give you a tutorial on how to add an admin view to the f
|
|||||||
|
|
||||||
### How To Add Editing Area
|
### How To Add Editing Area
|
||||||
|
|
||||||
Now what I will show you is how to add editing area, these three tabs to the front end of your site that it will function like a form. Who you would allowed to access the form will depend upon the permissions structure. You will see the permission structure is what [00:02:14](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m14s) controls, who can edit and who can add items to a specific admin view. Currently as you can see your public cannot edit this, if we created an item they cannot edit it. There's an item level on permissions. If I close out then you'll see in options there is also a global control on permissions. The global control of permissions [00:02:46](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m46s) is also, if you want public to be able to submit to this form, you need to allow them to be able to create. You would say allow, and the public is allowed to create. You will see that most components has more than one view. This one has only one it's called look. So you'll also have to over here(look create) [00:03:13](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m13s) say allow, and if you want them to edit existing submissions. There is the edit state, edit own, created by, all these things in the global spec, as well as in the local edit of the view.
|
Now what I will show you is how to add editing area, these three tabs to the front end of your site that it will function like a form. Who you would allowed to access the form will depend upon the permissions structure. You will see the permission structure is what [00:02:14](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02myou just Haven't kept in m14s) controls, who can edit and who can add items to a specific admin view. Currently as you can see your public cannot edit this, if we created an item they cannot edit it. There's an item level on permissions. If I close out then you'll see in options there is also a global control on permissions. The global control of permissions [00:02:46](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m46s) is also, if you want public to be able to submit to this form, you need to allow them to be able to create. You would say allow, and the public is allowed to create. You will see that most components has more than one view. This one has only one it's called look. So you'll also have to over here(look create) [00:03:13](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m13s) say allow, and if you want them to edit existing submissions. There is the edit state, edit own, created by, all these things in the global spec, as well as in the local edit of the view.
|
||||||
|
|
||||||
### Two Switches
|
### Two Switches
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ The getAction function asks whether look item, where the current user has the ed
|
|||||||
|
|
||||||
* ### Add A Button To Create New Looks
|
* ### Add A Button To Create New Looks
|
||||||
|
|
||||||
You could use the same button script, copy that. Here before the table, you could [00:11:29](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m29s) add a button to create new looks. All you would need to change is this link here(index_php?option_com_[[[component]]]) that it will have an id to zero. It will create a new look. That's a quick tutorial on how to add an editable [00:11:53](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m53s) admin view to the site end of your component. Then link it into your side view, that you can click on a button and edit a specific id view or create more. Then control that with this getAction helper class method, which gives you whether it can be edited. You can go look at this helper class in the code. [00:12:23](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m23s)
|
You could use the same button script, copy that. Here before the table, you could [00:11:29](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m29s) add a button to create new looks. All you would need to change is this link here ((index_php?option_com_[[[Component]]])) that it will have an id to zero. It will create a new look. That's a quick tutorial on how to add an editable [00:11:53](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m53s) admin view to the site end of your component. Then link it into your side view, that you can click on a button and edit a specific id view or create more. Then control that with this getAction helper class method, which gives you whether it can be edited. You can go look at this helper class in the code. [00:12:23](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m23s)
|
||||||
|
|
||||||
Let me just quickly open that for you. Here in the code, in helpers, we open demo.php. We scroll down until we get the method called getAction. [00:12:50](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m50s) Around 540 depends on how much the customer scripting there is been added. You can go through this logic to see that we are dealing with a number of concepts and trying to determine the permission to edit own and to create. It all gets stored and gives back to you [00:13:17](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m17s) in the result set. You could also echo out the result, var dump or something in the look to see exactly what is the result that you get from that structure.
|
Let me just quickly open that for you. Here in the code, in helpers, we open demo.php. We scroll down until we get the method called getAction. [00:12:50](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m50s) Around 540 depends on how much the customer scripting there is been added. You can go through this logic to see that we are dealing with a number of concepts and trying to determine the permission to edit own and to create. It all gets stored and gives back to you [00:13:17](https://www.youtube.com/watch?v=tmB22d9dQ4M&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m17s) in the result set. You could also echo out the result, var dump or something in the look to see exactly what is the result that you get from that structure.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user