From 7500a6182ca055f1eacfb79ad04e97b606c8af30 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Thu, 6 Jun 2019 13:38:31 +0200 Subject: [PATCH] Updated 009 Adding Admin Views to a Component (markdown) --- 009-Adding-Admin-Views-to-a-Component.md | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/009-Adding-Admin-Views-to-a-Component.md b/009-Adding-Admin-Views-to-a-Component.md index b93f48b..fce8aa1 100644 --- a/009-Adding-Admin-Views-to-a-Component.md +++ b/009-Adding-Admin-Views-to-a-Component.md @@ -36,31 +36,26 @@ If I go [00:05:33](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_w **Settings Switch MetaData** -Then depending on whether you going to use this views information on the front end as your main base for your [00:14:23](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m23s) page. You might want to add Metadata. The metadata isn't that useful anymore, although google and others are maybe ignoring it. It still plays a role to making a page very search engine optimized. Component builder if you do your homework and you do things right [00:14:51](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) in relationship to implementation of your metadata, you'd see that it actually adds tremendous good features to do the front end of your site. I would suggest that you add Metadata when you are going to use a specific area to the front and when we start looking at setting up the site views you'll see this coming up again and the necessity of using it. Obviously you'll be remodeling the data because you can get relationship from many databases. [00:15:26](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m26s) You need the area in the back end to get the data. +Depending on whether you are going to use the views information on the front end as your main base for your page, you might want to add metadata. [00:14:23](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m23s) Although Google and others may be ignoring it and metadata isn't that useful anymore, it still plays a role making a page search engine optimized. If you do your homework and do things right in relationship to implementation of your metadata, you'd see that it adds good features to do the front end of your site. [00:14:51](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) I'd suggest that you add metadata when you use a specific area to the front. (You'll be remodeling the data because you can get relationships from many databases. You need the area in the back end to get the data.) [00:15:26](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m26s) **Settings Switch Access** -Then this access switch might throw you out. This simply adds the following feature. If you open an article, and open publishing, it says 'dropdown', 'access public' ect. Which is relating to your user [00:15:52](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m52s) access levels. As you know user access levels can target multiple groups into one user access level. This again is only a feature that will be extremely useful when you look at the front end of your component. In the back end you can also make use of it. You can change the access of a specific item but since we also have such intense permissional switches, I hardly ever make use of it but it's there and I mostly use it for the front end when I want to set an item not to be accessible to the front. +This access switch adds the following feature: if you open an article, and open publishing, it says 'dropdown', 'access public' etc. Those are relating to your user access levels. [00:15:52](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m52s) As you know, user access levels can target multiple groups into one user access level. This is a feature that will be useful when you look at the front end of your component though you can also make use of it in the back end. You can change the access of a specific item but since we also have such intense permissional switches, I hardly ever make use of it. **Settings Switch Export/Import** -Then when you do want to add to import/export function. This is a [00:16:38](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m38s) extended area which component builder dynamically just adds. You don't need to do anything in relation to scripting at this stage. You could just click 'yes' or 'no' to import/export feature at the top of the page of every view. Every view will have an import/export function. At the moment it's a direct relationship import/export. If you export this then you'd see the the way it should look to do a import [00:17:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m13s) and if the import is really nice you can map the headers to their specific database tables. Obviously there's work needed especially when you're dealing with information that was encrypted. If you export it, it will decrypt it, if you have the permissions to access that item of course, but the problem is because it has been decrypted when you have imported it, it doesn't know that it should encrypt it. There is a little discrepancy with the advance storing methods. As long as you are having a data back end database table that doesn't require these advance storing methods, it's just your normal defaults like I explained before. Seemingly the import/export method will then works without any problems. I'm still working on this area but it is already working well enough to leave it in there for now. [00:18:07](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m07s) That is the switch here'Export/Import data' and if you don't like the feature just click 'no'. +When you want to add to import/export function. [00:16:38](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m38s) This is an extended area which component builder dynamically adds. You don't need to do anything in relation to scripting at this stage. You could click 'yes' or 'no' to import/export feature at the top of the page of every view. Every view will have an import/export function. It's a direct relationship import/export. If you export this, you'd see how to do a import; if it's is nice you can map the headers to their specific database tables. [00:17:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m13s) Work is needed, especially when you're dealing with information that was encrypted. If you export it, it will decrypt it if you have the permissions to access that item, but the problem is that it had been decrypted when you imported it, so it doesn't know that it should encrypt it. There is a discrepancy with the advance storing methods. As long as you are having a data back end database table that doesn't require these advance storing methods, it's normal defaults like I explained before. Then the import/export method will works without any problem. [00:18:07](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m07s) The switch here is 'Export/Import data.' If you don't like the feature just click 'no'. **Settings Switch Edit - Create - Site Views** -Then here is a feature which I think I'm most excited about. That is that every back end view has of course a edit area. If you've selected that read write option in the edit area you can change the values of that back end listview. The admin create site view means that the system is going to dynamically build [00:18:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m42s) the front area which you can access to edit the data at the front of the website. That is an excellent tool. It takes exactly this(see video) if I was to use this and as an example. It takes this editing area and place it on the front of your website. [00:19:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m13s) You are controlling in the permissional structures who has access to edit this, who has access to edit the status, who has access to edit specific fields. We looked at adding the fields to your admin views and you could click whether this field should have permissional structure. That means that if you have those things set up in the back in the global permissional tab, then it will be implemented in the front if a certain user is in the correct group. [00:19:44](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m44s) They won't be able to access this then if they have access. They don't have the right to, for example to update maybe the modified date or the status then in the front. They also will not be able to do that. You have immense control over who can do what. But at the same time you have the ability to actually edit items on the front. I think that is excellent to be able to do that. That all of that is possible by just saying, 'yes'. But realize this, the fact that it creates the [00:20:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m19s) view, if I could says so and places it on the front, doesn't mean that there is a link somewhere to it. That is something you need to add to your site front custom site as you develop it. This is partly a feature therefore which if you don't know PHP and if you're not that familiar with how to setup your links on the front of the component, would possibly find this difficult to implement. We will be looking at what it can build. [00:20:54](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m54s) I have a component in which I'm using that feature quite a lot. It's called 'costbenefitprojection'. Looking in the back end we look at the views, we have here one called 'company' and we have one called 'scaling' factor and 'intervention'. +Every back end view has an edit area. If you've selected the read/write option in the edit area you can change the values of that back end listview. The admin create site view means that the system will dynamically build the front area which you then can access to edit the data at the front of the website. [00:18:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m42s) It's an excellent tool. For example, it takes this editing area and places it on the front of your website. (See video.) [00:19:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m13s) In the permissional structures you can control who is editing this, etc. (We looked at adding the fields to your admin views; you could set whether this field should have permissional structure.) It means that if you have those things set up back in the global permissional tab, it will be implemented in the front. [00:19:44](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m44s) If the user is in the incorrect group he won't be able to access this. Nor, for example, update the modified date or the status in the front. You have control over who can do what but at the same time you have the ability to edit items on the front. [00:20:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m19s) However, the fact that it creates the view and places it on the front doesn't mean that there is a link somewhere to it. That is something you need to add to your site front custom site as you develop it. Therefore, if you don't know PHP and if you're not familiar with setting up your links on the front of the component, you would possibly find this feature difficult to implement. [00:20:54](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m54s) -Now these are 'editing views' as you can see and the other 'list views'. If I go to the front of the website [00:21:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m28s) and I open that component and click on view, you will see there is: company, intervention and scaling factors. They are basically being extended here. What the component builder does, it adds this view, and the module for it. I also add the controller for it. It puts all the script in place so that all you need to do is, for example: Inside the [00:22:00](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m00s) area called 'cpanel'. Looking at this component briefly. This is just some dummy data that I placed in here. Here you can open multiple items and you can click on 'edit advanced profile' and it will open the editing area. [00:22:37](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m37s) This is the front end editing area, as you can see there are all the tabs. Let me show you the back end. Here's the back end area. Its showing up the same information in the front. It only dumps the permission and publishing features. That is because of access permissions is done automatically [00:23:10](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s)<<<<<