public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, System.Reflection.PropertyInfo pi, Sitecore.Mvc.Presentation.Rendering rendering)
        {
            string fieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, FieldName);

            LinkField field = fieldsHelper.GetLinkField(rendering.Item, fieldName);

            return field.Target;
        }
        public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, PropertyInfo pi, Rendering rendering)
        {
            string fieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, FieldName);
            MultilistField field = (MultilistField)rendering.Item.Fields[fieldName];

            if (field == null)
            {
                return new string[] { };
            }

            return field.GetItems().Select(x => linksHelper.GetItemAbsoluteUrl(x)).ToArray();
        }
        public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, System.Reflection.PropertyInfo pi, Sitecore.Mvc.Presentation.Rendering rendering)
        {
            string fieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, FieldName);
            ImageField field = fieldsHelper.GetImageField(rendering.Item, fieldName);

            int result = 0;
            if (field != null && Int32.TryParse(field.Height, out result))
            {
                return result;
            }

            return result;
        }
        public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, System.Reflection.PropertyInfo pi, Sitecore.Mvc.Presentation.Rendering rendering)
        {
            string itemFieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, ItemFieldName);
            string rootFieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, RootFieldName);

            string result = mediaHelper.GetImageFieldMediaItemAbsoluteUrl(rendering.Item, itemFieldName);
            if (String.IsNullOrWhiteSpace(result))
            {
                result = mediaHelper.GetImageFieldMediaItemPath(itemsHelper.RootItem, rootFieldName);
            }

            return result;
        }
        public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, System.Reflection.PropertyInfo pi, Sitecore.Mvc.Presentation.Rendering rendering)
        {
            string itemFieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, ItemFieldName);
            string rootFieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, RootFieldName);

            string value = rendering.Item[itemFieldName];
            if (String.IsNullOrWhiteSpace(value))
            {
                value = itemsHelper.RootItem[rootFieldName];
            }

            return value;
        }
        protected string ResolveFieldName(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, PropertyInfo pi, string fieldName)
        {
            if (fieldNamePrefixAttribute == null || String.IsNullOrWhiteSpace(fieldNamePrefixAttribute.FieldNamePrefix))
            {
                if (String.IsNullOrWhiteSpace(fieldName))
                {
                    return SplitCamelCase(pi.Name);
                }

                return fieldName;
            }

            if (String.IsNullOrWhiteSpace(fieldName))
            {
                return String.Format("{0} {1}", fieldNamePrefixAttribute.FieldNamePrefix, SplitCamelCase(pi.Name));
            }

            return String.Format("{0} {1}", fieldNamePrefixAttribute.FieldNamePrefix, fieldName);
        }
        public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, System.Reflection.PropertyInfo pi, Sitecore.Mvc.Presentation.Rendering rendering)
        {
            string fieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, FieldName);

            return mediaHelper.GetImageFieldMediaItemMimeType(rendering.Item, fieldName);
        }
 public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, PropertyInfo pi, Rendering rendering)
 {
     string fieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, FieldName);
     return itemsHelper.RootItem[fieldName];
 }
 public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, PropertyInfo pi, Rendering rendering)
 {
     return itemsHelper.GetItemMachineName(rendering.Item);
 }
 public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, System.Reflection.PropertyInfo pi, Sitecore.Mvc.Presentation.Rendering rendering)
 {
     string fieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, FieldName);
     return new HtmlString(Sitecore.Web.UI.WebControls.FieldRenderer.Render(rendering.Item, fieldName));
 }
 public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, PropertyInfo pi, Rendering rendering)
 {
     return rendering.Item.Name;
 }
 public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, System.Reflection.PropertyInfo pi, Sitecore.Mvc.Presentation.Rendering rendering)
 {
     string fieldName = ResolveFieldName(fieldNamePrefixAttribute, pi, FieldName);
     return rendering.Parameters[fieldName] == "1";
 }
 public abstract object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, PropertyInfo pi, Rendering rendering);
        public override object GetValue(SitecoreFieldNamePrefixAttribute fieldNamePrefixAttribute, PropertyInfo pi, Rendering rendering)
        {
            string value = (string)base.GetValue(fieldNamePrefixAttribute, pi, rendering);

            return Regex.Split(value, Pattern);
        }