locked
Document Library treeview should navigate the same page RRS feed

  • Question

  • Hi I have query that ,I have document library and having some folders in the same.

    I have customized to show only one document library with folders in treeview.

    the treeview added in other page(custom.aspx) not in allitems.aspx page. and added document library in the same that the treeview have.

    Here is my question when i click on the any of the in the document library treeivew that is navigating to allitems.aspx.

    I want to navigate the same page(custom.aspx) which the document library treeview have.

     

    I wrote some java script

    <script>
    function _spNavigateHierarchy(nodeDiv, dataSourceId, dataPath, url, listInContext, type) {
        ProcessDefaultNavigateHierarchy(nodeDiv, dataSourceId, dataPath, url, listInContext, type, document.forms.aspnetForm, "", "..\..\..\u002fcustom.aspx");
    }

    please look into the and let me know if any thing require for the same.


    • Edited by Mike Walsh FIN Friday, July 29, 2011 9:28 AM "please refer and do needful:" is nonsense
    Friday, July 29, 2011 8:42 AM

Answers

  • Hi Naresh,

    I understand that you created a custom.aspx page with a tree view, and the tree view had only another document library including some folders. And you wanted to display the document library in the content area of the custom.aspx page by clicking the “document library” in the tree view.
    Based on my research, whichever the custom page with the tree view you used would jump to the URL of the original document library, and the URL is transformed by the java script like you mentioned (the last parameter should be the current page relevant URL).

    In my opinion, even if you get URL you want with the custom java script, it is also very difficult to add that document library in a custom page, and include its all sub Folders with the code.
    But you can customize the document library “AllItems.aspx” page as the “Custom.aspx” page directly, it would be navigated in the same page, if this can still achieve your requirement.

    Thanks,
    Daniel


    Regards, Daniel
    • Marked as answer by Wayne Fan Monday, August 8, 2011 3:10 AM
    Wednesday, August 3, 2011 1:03 PM
    Moderator

All replies

  • Hi Naresh,

    I understand that you created a custom.aspx page with a tree view, and the tree view had only another document library including some folders. And you wanted to display the document library in the content area of the custom.aspx page by clicking the “document library” in the tree view.
    Based on my research, whichever the custom page with the tree view you used would jump to the URL of the original document library, and the URL is transformed by the java script like you mentioned (the last parameter should be the current page relevant URL).

    In my opinion, even if you get URL you want with the custom java script, it is also very difficult to add that document library in a custom page, and include its all sub Folders with the code.
    But you can customize the document library “AllItems.aspx” page as the “Custom.aspx” page directly, it would be navigated in the same page, if this can still achieve your requirement.

    Thanks,
    Daniel


    Regards, Daniel
    • Marked as answer by Wayne Fan Monday, August 8, 2011 3:10 AM
    Wednesday, August 3, 2011 1:03 PM
    Moderator
  • Hi Mike,

    I found a solution for this issue allowing SPTreeView to navigate in the same custom page. If you are still interested you can it find it in my blog:

    http://www.youvegotcode.com/2013/11/how-to-make-sptreeview-work-on-custom.html

    Thank you,

    Ibraheem

    • Proposed as answer by dreamibr Friday, November 15, 2013 6:58 PM
    Friday, November 15, 2013 6:58 PM