@foreach(KeyValuePair<string,string> faq in faqs) {
@faq.Key
@Html.Raw(faq.Value)
}
} @* To get this to work, you need to define it in the master template under the last script tag like this: @RenderSection("ScriptsBottom", false) *@ @section ScriptsBottom{
} @* I've used a function in the template here so it is easier to take it out and put it into a separate helper class *@ @functions { public List<KeyValuePair<string, string>> GetFAQsModel() { List<KeyValuePair<string, string>> model = null; if(Model.Content.HasProperty("fAQList")) { model = new List<KeyValuePair<string, string>>(); ArchetypeModel faqList = Model.Content.GetPropertyValue("fAQList"); foreach(ArchetypeFieldsetModel faq in faqList) { string question = faq.GetValue("question"); string answer = faq.GetValue("answer"); model.Add(new KeyValuePair<string, string>(question, answer)); } } return model; } }