I am currently working on SharePoint Online and I have created a customer page layout that is using Bootstrap accordion. Inside the accordion I have a document library that contains folders.

The issue occurs when a user clicks a folder page gets reloaded and the accordion collapses itself meaning users have to click to expand the accordion again and view the contents inside the folder.

Is it possible to prevent a page layout when clicking a folder? I have edited the web part properties and turned on enable asynchronous load and enable asynchronous update however this does not appear to have worked.

  • Another approach to this problem could be to store the state of the accordion in a cookie. After page reload the cookie is read and you can adjust the state of the accordion accordingly. You could use his library: github.com/js-cookie/js-cookie. Jun 21, 2016 at 12:45
  • Thanks Daniel, is there not a more simple solution though?
    – Adam13Hylo
    Jun 21, 2016 at 13:24
  • Hmm, at least not that I know. The least amount of page reload you can get is from the Minimal Download Strategy which will just partially reload the page when you browse the folders. If even that is affecting your accordion (because it is located in an area that's reloaded), then storing the state somehow (cookies, DB, browser local storage) is the only way to persist the data. Jun 21, 2016 at 13:30


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.