Advertisement
Guest User

Untitled

a guest
May 18th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. @inherits Umbraco.Web.Mvc.UmbracoTemplatePage<ContentModels.GalleryFrontpage>
  2. @using ContentModels = Umbraco.Web.PublishedContentModels;
  3. @{
  4. Layout = "Master.cshtml";
  5. var listOfCategories = CurrentPage.Children();
  6. }
  7.  
  8. <div id="categoryOverview">
  9. @CurrentPage.mainContent
  10.  
  11. @foreach (var item in listOfCategories)
  12. {
  13. var countSubpages = item.Children.Count();
  14. var subpages = item.Children();
  15. string imgPath = @item.GetCropUrl("categoryImage", "Category");
  16.  
  17.  
  18. <div class="galleryItem">
  19. <div class="img">
  20. <img src="@imgPath" />
  21. </div>
  22. <div class="info">
  23. <h2>
  24. <a class="title" href="@item.Url">@item.Name</a>
  25. </h2>
  26. @Umbraco.Truncate(item.mainContent, 100)
  27. </div>
  28.  
  29. <div id="brand">
  30. <h2>@item.Name / @countSubpages images / SHOW COUNT FOR DOWNLOADABLE PROJECTS</h2>
  31. </div>
  32. </div>
  33.  
  34. }
  35. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement