From 210f75e9afe5777cbc2a6fece7006b94717cb930 Mon Sep 17 00:00:00 2001 From: Amigo <49749100+aamigo@users.noreply.github.com> Date: Thu, 15 Aug 2019 14:41:47 +0200 Subject: [PATCH] Updated 029 How to overwrite the custom fields (markdown) --- 029-How-to-overwrite-the-custom-fields.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/029-How-to-overwrite-the-custom-fields.md b/029-How-to-overwrite-the-custom-fields.md index bf0fef8..06f43f9 100644 --- a/029-How-to-overwrite-the-custom-fields.md +++ b/029-How-to-overwrite-the-custom-fields.md @@ -5,11 +5,11 @@ [00:00:00](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m00s) (_Click on these time links to see Youtube video_) -It may happen that you would prefer to use some of the default fields in a different manner than that of Component Builder's way of implementation. What is the default fields? [00:00:12](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m12s) If you go to add a new Admin View or to an Admin View that already exists, it may be seen that there is this note above Adding Fields. It indicates that the 'ID', the 'asset_id', the 'state', the 'access', the 'ordering', the 'created_by', the 'date_created', 'modified_by', 'date_modified', 'checked_out', 'Check_out_time', 'version', 'hits', 'metakey', 'metadescription', and 'metadata' has already been added to the view. [00:00:41](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m41s) These are the default fields that always gets added to the view even if you do not create them. In fact it is not necessary to create them. Sometimes you might want to display some of these fields in a different area of the application. Currently the ID field and the State field is the only fields that are being shown by default in the List view. [00:01:20](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m20s) +It may happen that you would prefer to use some of the default fields in a different manner than that of Component Builder's way of implementation. What is the default fields? [00:00:12](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m12s) If you go to add a new Admin View or to an Admin View that already exists, it may be seen that there is this note above Adding Fields. It indicates that the 'ID', the 'asset_id', the 'state', the 'access', the 'ordering', the 'created_by', the 'date_created', 'modified_by', 'date_modified', 'checked_out', 'Check_out_time', 'version', 'hits', 'metakey', 'metadescription', and 'metadata' has already been added to the view. [00:00:41](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m41s) These are the default fields that always gets added to the view even if you do not create them. In fact, it is not necessary to create them. Sometimes you might want to display some of these fields in a different area of the application. Currently, the ID field and the State field is the only fields that are being shown by default in the List view. [00:01:20](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m20s) * ### Example Of Default Fields Displayed in List view -In the Experts area the 'Id field', the 'Status field' and as well as the Ordering field are shown. The Ordering field does not show the order number. To be able to move and order it, click on that "Up/Down" button(see video),. [00:01:45](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m45s) All that is done by default. The other values are not displayed in the List View. Once there had been client that requested that it should be possible to see the date on which something had been created as well as the identity of the person who created it. Component Builder then needed to be adapted so that those things could also be overwritten. +In the Experts area the 'Id field', the 'Status field' and as well as the Ordering field are shown. The Ordering field does not show the order number. To be able to move and order it, click on that "Up/Down" button(see video),. [00:01:45](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m45s) All that is done by default. The other values are not displayed in the ListView. Once there had been client that requested that it should be possible to see the date on which something had been created as well as the identity of the person who created it. Component Builder then needed to be adapted so that those things could also be overwritten. This is what has been done: If a field is created in Component Builder, as a field would normally be created and any of these names should be given to it, 'Created by' or 'Created date', but exactly the same name. [00:02:23](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m23s) Then it will overwrite the default. @@ -21,20 +21,20 @@ In this specific Job Order view, there is a field 'Created-by'. That may be op [00:03:46](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m46s) -If these values is unknown it can be seen in the compiled field.[00:03:51](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m51s) Open 'Administrator' that is the back end of the component and open the relevant component. If 'Models' is opened, there is a place called 'Forms'. When it is opened, a list of forms may be seen that correspond to the back end views that you have created. In this instance this 'Job Order' is the one. [00:04:19](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m19s) Open the XML, double click on it and scroll down. 'Modified by' and some of its default can be seen. So this(See video) value needs to be overwritten. Then these values need to be updated or used. [00:04:45](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m45s) +If these values are unknown it can be seen in the compiled field. [00:03:51](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m51s) Open 'Administrator' that is the back end of the component and open the relevant component. If 'Models' is opened, there is a place called 'Forms'. When it is opened, a list of forms may be seen that correspond to the back end views that you have created. In this instance, this 'Job Order' is the one. [00:04:19](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m19s) Open the XML, double click on it and scroll down. 'Modified by' and some of its default can be seen. So this(See video) value needs to be overwritten. Then these values need to be updated or used. [00:04:45](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m45s) -NB. This is the only part that should not be changed, if it is changed, it will not be known if a attempt has been made to overwrite one of the default fields because it uses the name as the identifier. Back in Editing the field, the fields that were created was the first part. Close them again. +NB. This is the only part that should not be changed, if it is changed, it will not be known if an attempt has been made to overwrite one of the default fields because it uses the name as the identifier. Back in Editing the field, the fields that were created was the first part. Close them again. ### Adding The Fields [00:05:06](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m06s) -When any other field is needed simply go to fields (if 'Settings' is selected in Editing the Admin view) then those fields can be added. There's the 'Created-date' and there is the 'Created-by'. Both is added to be shown, and also the position and how it should be treated. It had been set in the 'left tab' of the '15th'. +When any other field is needed simply go to fields (if 'Settings' is selected in Editing the Admin view) then those fields can be added. There's the 'Created-date' and there is the 'Created-by'. Both are added to be shown, and also the position and how it should be treated. It had been set in the 'left tab' of the '15th'. ### Adding In Tabs(default 15 tab) [00:05:41](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m41s) If you would like the fields to be displayed in the same place as before, in the Edit view, then add it to the '15th' tab. It is very unlikely that so many tabs would be created. -Now what is a tab? If you would to go to the view, then this is tab 1 this tab 2 3 4 5 and 6(see video). Since publishing may vary. [00:06:14](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m14s) - It does not make sense to target it in any way directly as the 5th of the 4th. So a very high number like 15 is chosen. If number 15 is selected, it will add these two fields in the same place it would if it had to build it for you. But if for some reason the field should be displayed in a different tab, it may be selected and put in the 3rd tab and saved. [00:06:53](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m53s) Compile the components and install it. Then 1, 2, 3, will appear in the third tab. Then indicate in what tab it should now be displayed. So now the 'Create' date no longer shows in the 'Publish' tab. It is only created by what shows up here(See video).[00:07:24](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m24s) The field gets moved to a different tab, and displays the field in the List view as well. Simply because the fields were added(see video) and set to be displayed and to be added to the third tab. It is moved back to number 15 which is its default place. Save it, compile and install it. [00:08:03](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m03s) Update the component. Refresh the page. It is no longer seen in 'Documents', in 'Production', in 'Stock list', it is back in 'Published' in the correct place. That's where it will be set if it is not override. Using the 15th tab as the target puts it in its default place. If another tab number is used, it removes it from its default place, and puts it where it is assigned. That is how you can overwrite the Custom Added Fields in the back end view. [00:08:49](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m49s) \ No newline at end of file +Now, what is a tab? If you would go to the view, then this is tab 1 this tab 2 3 4 5 and 6(see video). Since publishing may vary. [00:06:14](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m14s) + It does not make sense to target it in any way directly as the 5th of the 4th. So a very high number like 15 is chosen. If number 15 is selected, it will add these two fields in the same place it would if it had to build it for you. But if for some reason the field should be displayed in a different tab, it may be selected and put in the 3rd tab and saved. [00:06:53](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m53s) Compile the components and install them. Then 1, 2, 3, will appear in the third tab. Then indicate in what tab it should now be displayed. So now the 'Create' date no longer shows in the 'Publish' tab. It is only created by what shows up here(See video). [00:07:24](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m24s) The field gets moved to a different tab, and displays the field in the List view as well. Simply because the fields were added(see video) and set to be displayed and to be added to the third tab. It is moved back to number 15 which is its default place. Save it, compile and install it. [00:08:03](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m03s) Update the component. Refresh the page. It is no longer seen in 'Documents', in 'Production', in 'Stock list', it is back in 'Published' in the correct place. That's where it will be set if it is not overridden. Using the 15th tab as the target puts it in its default place. If another tab number is used, it removes it from its default place and puts it where it is assigned. That is how you can overwrite the Custom Added Fields in the back end view. [00:08:49](https://www.youtube.com/watch?v=FHQfIhWHYyQ&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h08m49s) \ No newline at end of file