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; }
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; }
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; }