Example #1
0
        public static HtmlString Field(this SitecoreHelper htmlHelper, string fieldName, Item item, object parameters, bool shouldWrap)
        {
            string format = shouldWrap ? "<p>{0}{1}</p>" : "{0}{1}";
            var    value  = String.Format(format,
                                          htmlHelper.BeginField(fieldName, item, parameters),
                                          htmlHelper.EndField());

            return(new HtmlString(value));
        }