Announcement

Collapse
No announcement yet.

Default view for folder trees

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Default view for folder trees

    How can I achieve the document`s entity view to be default like this:

    Document folders allow creating a so-called document repository where all the files are properly categorized according to the needs of the company. Each document folder can have several sub-folders. The folders can be presented in a tree view or a list view.


    When I open the documents, I always get the folder view, but I need the tree view with the folders and documents on the right side.

  • #2
    Hi shalmaxb,

    On the page with a list of folders for your documents, click on the ellipsis in the upper right corner (under the Create Document button) and select the Show Navigation Panel function.

    Comment


    • #3
      Hi,
      thank you, but this is, what I always do, only I would like to have that view as default without alway having to switch to it. It does not keep that view for the next time.

      Comment


      • #4
        shalmaxb,

        Try to select Expand function.

        Comment


        • #5
          I have already tried all the possibilities and they work for the moment, but the next time I open the documents, it displays again the folder view.

          Comment


          • #6
            Originally posted by shalmaxb View Post
            How can I achieve the document`s entity view to be default like this:

            Document folders allow creating a so-called document repository where all the files are properly categorized according to the needs of the company. Each document folder can have several sub-folders. The folders can be presented in a tree view or a list view.


            When I open the documents, I always get the folder view, but I need the tree view with the folders and documents on the right side.
            you can achieve this by creating a new file under custom/Espo/Custom/Resources/metadata/clientDefs/DocumentFolder.json and use code below:

            Code:
            {
            "isExpandedByDefault": true,
            "isCollapsedByDefault": true
            }
            isExpandedByDefault makes the tree view applied by default and isCollapsedByDefault makes the folders collapsed by default just like the image on the link you shared.

            hope this helps.
            Last edited by rabii; 05-30-2022, 03:03 PM.

            Comment


            • #7
              Thanks rabii, but that does not work either.

              Comment


              • #8
                That is weird, which version you have ?

                It is working on my instant, iam using latest version 7.1.7. see attached screenshot
                Attached Files

                Comment


                • #9
                  tested again, closed the browser, cleared cache (browser and espoCRM), rebuild, closed browser again, no way.

                  A bit strange, I already have a DocumentFolder.json file at that location with the following code:

                  Code:
                  {
                  "kanbanViewMode": false,
                  "color": null,
                  "iconClass": null
                  }
                  but even, if I delete that code and put in only your provided snippet, it won`t work. I can switch the view by the ellipsis menu, but whenever I close the app, opening the next time will show the same only folder view
                  Last edited by shalmaxb; 05-31-2022, 01:39 PM.

                  Comment


                  • rabii
                    rabii commented
                    Editing a comment
                    Please note that you need to make changes in DocumentFolder.json under clientDefs not the Document.json hence the DocumentFolder is a type of category.

                  • shalmaxb
                    shalmaxb commented
                    Editing a comment
                    Yes, I did that, I used the same path as you mentioned in post no. 6

                • #10
                  That is weird i have just tried the same code on another installation and it working 100%. Just created a new file on custom/Espo/Custom/Resources/metadata/clientDefs/DocumentFolder.json and copied code and it is working perfect.

                  can you share your code (DocumentFolder.json)!

                  Comment


                  • #11
                    Originally posted by shalmaxb View Post
                    tested again, closed the browser, cleared cache (browser and espoCRM), rebuild, closed browser again, no way.

                    A bit strange, I already have a Document.json file at that location with the following code:

                    Code:
                    {
                    "kanbanViewMode": false,
                    "color": null,
                    "iconClass": null
                    }
                    but even, if I delete that code and put in only your provided snippet, it won`t work. I can switch the view by the ellipsis menu, but whenever I close the app, opening the next time will show the same only folder view
                    why did you mentioned here that you already have Document.json ? if you are making changes in Document.json it is not going to work, it has to be DocumentFolder.json

                    Comment


                    • shalmaxb
                      shalmaxb commented
                      Editing a comment
                      this was only a typing error, actually I have a file DocumentFolder.json at that location with the mentioned code already in it. I don`t know, from where this came, because I do not use Kanban in no place.
                      Last edited by shalmaxb; 05-31-2022, 01:52 PM.

                  • #12
                    Also please that you can only apply one value at the time it is either "isExpandedByDefault": true (which will give you the tree view but also will expand all files under any folder Or "isCollapsedByDefault":true which also produce tree view but it will give you access to only file on root and folder to access on top of the list. You can't use both value as true it will not work.

                    Comment


                    • shalmaxb
                      shalmaxb commented
                      Editing a comment
                      tried also this, did not change

                  • #13
                    I again tried to make it work. I renamed the present file DocumentFolder.json for it does not have effect.
                    I created a new DocumentFolder.json in the place where you mentioned with the following code:

                    Click image for larger version

Name:	code.jpg
Views:	193
Size:	13.4 KB
ID:	80872











                    But it did not work either. Cleared cache again, did rebuild and all that, but the default view does not change.
                    Perhaps it could be, because I modified the document entity, but only by GUI in Admin.

                    Comment


                    • #14
                      Coded this way:

                      Code:
                      {
                      "isExpandedByDefault": true,
                      "isCollapsedByDefault": false
                      }
                      it finally works. I had to do some browser refreshs until it appeared this way.
                      Thanks a lot for your patient help.

                      Comment


                      • rabii
                        rabii commented
                        Editing a comment
                        i am glad it worked finally.
                    Working...
                    X