Archetype.Extensions.HtmlHelperExtensions._renderPartials C# (CSharp) Method

_renderPartials() private static method

Renders the partials based on the model, partial path and given viewdata dictionary.
private static _renderPartials ( this htmlHelper, ArchetypeModel archetypeModel, string partialPath, ViewDataDictionary viewDataDictionary ) : IHtmlString
htmlHelper this The HTML helper.
archetypeModel ArchetypeModel The archetype model.
partialPath string The partial path.
viewDataDictionary ViewDataDictionary The view data dictionary.
return IHtmlString
        private static IHtmlString _renderPartials(this HtmlHelper htmlHelper, ArchetypeModel archetypeModel, string partialPath, ViewDataDictionary viewDataDictionary)
        {
            var sb = new StringBuilder();

            foreach (var fieldsetModel in archetypeModel)
            {
                sb.AppendLine(_renderPartial(htmlHelper, fieldsetModel, partialPath, viewDataDictionary).ToString());
            }

            return new HtmlString(sb.ToString());
        }