Skip to content

Instantly share code, notes, and snippets.

@kieran23101
Last active April 12, 2021 14:15
Show Gist options
  • Save kieran23101/c09facb56b36563539d07a7b6e715cc5 to your computer and use it in GitHub Desktop.
Save kieran23101/c09facb56b36563539d07a7b6e715cc5 to your computer and use it in GitHub Desktop.
Add accordion in edit mode for list of items
@if (DotNetNuke.Common.Globals.IsEditMode())
{
<div id="[email protected]">
<div class="card">
<div class="card-header" id="[email protected]" >
<h5 class="mb-0">
<a class="btn btn-primary text-white" data-toggle="collapse" data-target="#[email protected]" aria-expanded="true" aria-controls="[email protected]">Show Admin Section</a>
</h5>
</div>
<div id="[email protected]" class="collapse" aria-labelledby="[email protected]" data-parent="#[email protected]">
<div class="card-body">
@Edit.Toolbar(Content, actions: "new,instance-list")
<ul>
@foreach(var cont in AsDynamic(Data["Default"])){
<li>
@cont.EntityTitle
@Edit.Toolbar(cont, actions: "edit,remove")
</li>
}
</ul>
</div>
</div>
</div>
</div>
}
@kieran23101
Copy link
Author

Converted to allow multiple on a page assuming that its used within the 2sxc app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment