Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2015
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
  2. @using System;
  3. @{var siteRoot = Umbraco.TypedContentAtRoot().FirstOrDefault(); }
  4. <div class="container">
  5. <!-- Page Features -->
  6. <div class="row text-center">
  7.  
  8. @{if (siteRoot != null)
  9. {
  10. var selection = siteRoot.FirstChild(f => f.Name == "Company Applications").Children.Where(f => f.HasProperty("ApplicationType"));
  11.  
  12.  
  13. foreach (var item in selection)
  14. {
  15. List<string> myTags = new List<string>();
  16.  
  17. foreach (var newTag in item.GetPropertyValue<string>("ApplicationType").Split(','))
  18. {
  19. myTags.Add(newTag);
  20. }
  21.  
  22. if (myTags.Contains("Teller"))
  23. {
  24. var myimage = Umbraco.TypedMedia(item.GetPropertyValue("ApplicationImage"));
  25. <p></p>
  26. <div class="col-md-3 col-sm-6 hero-feature">
  27. <div class="thumbnail">
  28. <img src="@myimage.Url" alt="">
  29. <div class="caption">
  30. <h3>@item.GetPropertyValue("ApplicationName")</h3>
  31. <p>@item.GetPropertyValue("ApplicationDescription")</p>
  32. <p>
  33. <a href="@item.GetPropertyValue("ApplicatioLinks")" class="btn btn-primary">Open</a> <a href="@item.Url" class="btn btn-default">More Info</a>
  34. </p>
  35. </div>
  36. </div>
  37. </div>
  38. }
  39. }
  40. }
  41. }
  42. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement