Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <p class="lead">Kategorie</p>
  2. <div class="list-group">
  3. @helper showTree(Shop.Models.Category category)
  4. {
  5.  
  6. @Html.ActionLink((string)category.Name, "Category", new { id = (int)category.CategoryID }, new { @class = "list-group-item" })
  7. foreach (var cat in category.ChildrenCategories)
  8. {
  9. @showTree(cat);
  10. }
  11. }
  12.  
  13. @foreach (var cat in Model.Categories)
  14. {
  15. if (cat.BaseCategoryID == null)
  16. {
  17. @showTree(cat);
  18. }
  19.  
  20. }
  21.  
  22. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement