Search code examples
sitefinity

sitefinity view cshtml accordion list


I am returning a list object within a list object and wanted to have the sub list in accordion list. Do I need to do this in JS or jquery? Or is this something within sitefinity controls that will be faster and better to use?


Solution

  • I do something like this

    https://github.com/sitefinitysteve/RandomSiteControlsMVC/blob/master/RandomSiteControlsMVC/MVC/Views/DocumentTree/Simple.cshtml

    (Try here https://rscdemo.sitefinitysteve.com/components/document-treelist)

    If you have bootstrap on there, just add the collapse attributes to your elements

    https://getbootstrap.com/docs/4.3/components/collapse/