Skip to content

Instantly share code, notes, and snippets.

@rbaty-barr
Last active August 29, 2015 14:06
Show Gist options
  • Save rbaty-barr/d9f5c7a370be09db7aee to your computer and use it in GitHub Desktop.
Save rbaty-barr/d9f5c7a370be09db7aee to your computer and use it in GitHub Desktop.
highligterView
@inherits Umbraco.Web.Mvc.UmbracoViewPage<ArchetypeFieldsetModel>
@using Archetype.Models;
@using System;
@using System.Text;
@using System.Text.RegularExpressions;
@using Umbraco;
@using trainingNetWWW.App_Code;
<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, "");
string term = @item.GetValue("hideShowBody");
string OldTerm = "Dependent";
<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-circle"></i> @Html.Raw(@item.GetValue("hideShowTitle"))
</a>
</h4>
</div>
<div id="@itemID" class="panel-collapse collapse">
<div class="panel-body">
@if(!string.IsNullOrEmpty(@term)){
@Html.Raw(@term.TransformGlossaryTerms(this.ViewContext.Controller.ControllerContext));
} else {
<p>No Content</p>
}
</div>
</div>
</div>
}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment