Updated 028 How to change exported values and setup custom import options (markdown)
parent
da6e008cc7
commit
817228478c
@ -25,9 +25,16 @@ This 'getExportdata' method has this extra value called '$_export' set to 'true'
|
||||
|
||||
### Admin View - PHP - (GetListQuery)
|
||||
|
||||
The custom scripting is done in the 'Editing the Admin View' area. With the Admin View open, go to PHP and then scroll down until the method ' Add PHP (getListQuery - JModellist)' can be seen and then it should be set to 'Yes'. [00:05:43](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m43s) The code, that is put there, is added both to the 'getListQuery', as well as to 'exportquery'. If the values need to be changed that had been exported, but not the values that's being shown in the component, it have to be done in the same area. It will be noticed that the same code appears in two distinct places(See video). [00:06:22](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m22s) If some value needs to be changed, that may be done simply by adding another 'lookup', and add this '$_export=true'. To see where all this '$_export=true' is appearing, go to any List model and search and it may be seen in different places(See video). [00:06:55](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m55s) <<<<<<<<<<<<<<<<<<<<<<
|
||||
The custom scripting is done in the 'Editing the Admin View' area. With the Admin View open, go to PHP and then scroll down until the method ' Add PHP (getListQuery - JModellist)' can be seen and then it should be set to 'Yes'. [00:05:43](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m43s) The code, that is put there, is added both to the 'getListQuery', as well as to 'exportquery'. If the values need to be changed that had been exported, but not the values that's being shown in the component, it have to be done in the same area. It will be noticed that the same code appears in two distinct places(See video). [00:06:22](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m22s) If some value needs to be changed, that may be done simply by adding another 'lookup', and add this '$_export=true'. To see where all this '$_export=true' is appearing, go to any List model and search and it may be seen in different places(See video). [00:06:55](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m55s)
|
||||
|
||||
We are now in the getExportdata, we are in the area, where is looking, remember we showed you in the previous tutorial how to add some customisation to your values in the listview, some HTML, well here we are asking if the export set? or is it true? Then Don't do this. Don't add this feature here. [00:07:25](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m25s) We are avoiding adding this customisation of coloring because we don't wanted to run when we are exporting. We only wanted the values. Again you can see we're using the export values. So those are the places where the export function is coming in to play, and how we can by using this [00:07:53](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m53s) _export we are able to identify whether it's an export or not. If it is we can make the changes to the values as we like. Then going back to our back end just to show you this(PHP) is the place where we did the query. And this is the place - before the translation fix, decryption. We are checking whether we are doing an export. And so you could literally take that(see video) [00:08:30](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m30s) and say instead of the exclamation that if the export 'isset' and export is true, then over here do your thing in that area there. That is if you want to change the values before translation or before decryption or if you want to you can do it after that. So after all was done you want to change the values [00:09:18](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m18s) on an export. Then you can add it there. And that is really as simple as it is. Adding a change to your exported values.
|
||||
Go to the 'getExportdata' area. In the previous tutorial it had been explained how to add some customization to the values in the 'listview', some HTML, Here(See video) should be determined if the 'export' is 'set' or is it 'true'?
|
||||
|
||||
NB. Don't add this feature here. [00:07:25](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m25s)
|
||||
|
||||
The adding of this customization of coloring is avoided because it should not be running during the export process. Only the values is needed. Again it can be seen that the export values are used. [00:07:53](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m53s) That is the places where the export function is involved, and by using this '$_export' it is possible to identify whether it's an export or not. If it is, changes can be made to the values as necessary. Going back to the back end just to show that this(PHP area) is the place where the query had been done. <<<<<<<<<<<<<<<<<<,
|
||||
|
||||
|
||||
And this is the place - before the translation fix, decryption. We are checking whether we are doing an export. And so you could literally take that(see video) [00:08:30](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m30s) and say instead of the exclamation that if the export 'isset' and export is true, then over here do your thing in that area there. That is if you want to change the values before translation or before decryption or if you want to you can do it after that. So after all was done you want to change the values [00:09:18](https://www.youtube.com/watch?v=fau5mZ6naLc&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h09m18s) on an export. Then you can add it there. And that is really as simple as it is. Adding a change to your exported values.
|
||||
|
||||
### Import Features Explained
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user