I want to use the accordion class in Bootstrap 3 in SharePoint 2013 to customize the left navigation bar dynamically. The structure in SP is like:
- Subsite
- Subsite 2
- Pages Folder
- Folder 1
- Page 1
- Page 2
- Folder2
- Page 3
- Page 4
- etc
- Folder 1
- Pages Folder
- Subsite 2
So when I enter Subsite 2, I want it to list the folders under this Subsite (Folder 1 and Folder 2 will show). And the Bootstrap accordion class will make it that if I click on Folder 1, it will expand and show the content (Page 1 and Page 2). Then, if i click on Folder 2, it will expand and show the content (Page 3 and 4), while Folder 1 will collapse.
But enough about the bootstrap-class. So the question is, how can I show the content dynamically , what SharePoint-code should I use? Because as standard, SharePoint doesn't list content (pages in this case) under folders. And if I use the standard-code for left navigation, I won't be able to customize it as I want.
Thanks!