Ejemplo n.º 1
0
        private string GetPropertyValue(umbraco.NodeFactory.Node umbracoNode, string propertyAlias)
        {
            if (umbracoNode.GetProperty(propertyAlias) == null && string.IsNullOrWhiteSpace(umbracoNode.GetProperty(propertyAlias).Value))
                return string.Empty;

            return umbracoNode.GetProperty(propertyAlias).Value;
        }
Ejemplo n.º 2
0
 private static string safeProperty(umbraco.presentation.nodeFactory.Node n, string alias)
 {
     if (n.GetProperty(alias) != null && !string.IsNullOrEmpty(n.GetProperty(alias).Value))
         return n.GetProperty(alias).Value;
     else
         return string.Empty;
 }
Ejemplo n.º 3
0
        public static List<ImageInfo> getImagesOfItem(umbraco.NodeFactory.Node node)
        {
            List<ImageInfo> images = new List<ImageInfo>();

            string temp = Helpers.getCroppedImageUrl(node.GetProperty<string>("picture01Cropped"), null);
            if (temp != "") {
                images.Add(new ImageInfo { desc = "", img = temp});
                temp = "";
            }

            temp = Helpers.getCroppedImageUrl(node.GetProperty<string>("picture02Cropped"), null);
            if (temp != "")
            {
                images.Add(new ImageInfo { desc = "", img = temp });
                temp = "";
            }

            temp = Helpers.getCroppedImageUrl(node.GetProperty<string>("picture03Cropped"), null);
            if (temp != "")
            {
                images.Add(new ImageInfo { desc = "", img = temp });
                temp = "";
            }

            temp = Helpers.getCroppedImageUrl(node.GetProperty<string>("picture04Cropped"), null);
            if (temp != "")
            {
                images.Add(new ImageInfo { desc = "", img = temp });
                temp = "";
            }

            temp = Helpers.getCroppedImageUrl(node.GetProperty<string>("picture05Cropped"), null);
            if (temp != "")
            {
                images.Add(new ImageInfo { desc = "", img = temp });
                temp = "";
            }

            temp = Helpers.getCroppedImageUrl(node.GetProperty<string>("picture06Cropped"), null);
            if (temp != "")
            {
                images.Add(new ImageInfo { desc = "", img = temp });
                temp = "";
            }

            temp = Helpers.getCroppedImageUrl(node.GetProperty<string>("picture07Cropped"), null);
            if (temp != "")
            {
                images.Add(new ImageInfo { desc = "", img = temp });
                temp = "";
            }

            return images;
        }