Last active
August 29, 2015 14:04
-
-
Save rbaty-barr/5bb88832390535a4fe1b to your computer and use it in GitHub Desktop.
render hide shows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ArchetypeFieldsetModel> | |
@using Archetype.Models; | |
@using System.Text; | |
@using System.Text.RegularExpressions; | |
<div class="panel-group" id="accordion"> | |
@foreach(var item in Model.GetValue<ArchetypeModel>("hideShowItem")){ | |
var str = "collapse" + @item.GetValue("hideShowTitle").Replace(" ", ""); | |
Regex rgx = new Regex("[^a-zA-Z0-9-]"); | |
var itemID = rgx.Replace(str, ""); | |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<h4 class="panel-title"> | |
<a data-toggle="collapse" href="#@itemID" class="accordion-toggle"> | |
<i class="fa fa-plus-square"></i> @Html.Raw(@item.GetValue("hideShowTitle")) | |
</a> | |
</h4> | |
</div> | |
<div id="@itemID" class="panel-collapse collapse"> | |
<div class="panel-body"> | |
@Html.Raw(@item.GetValue("hideShowBody")) | |
</div> | |
</div> | |
</div> | |
} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment