Exemple #1
0
        public static string GetFilePath(
            this UrlHelper urlHelper,
            PropertyValue value)
        {
            if (value.AsString.IsNullOrEmpty())
            {
                return(null);
            }

            var path = Pather.Combine("~/", value.Property.FileOptions.Path, value.AsString).Replace("\\", "/");

            return(urlHelper.Content(path));
        }
Exemple #2
0
        public static string GetImageBigPath(
            this UrlHelper urlHelper,
            PropertyValue value)
        {
            if (value.AsString.IsNullOrEmpty())
            {
                return(null);
            }

            var settings = value.Property.FileOptions.Settings.FirstOrDefault();
            var path     = Pather.Combine("~/", value.Property.FileOptions.Path, settings.SubPath, value.AsString).Replace("\\", "/");

            return(urlHelper.Content(path));
        }