Posted by : Jebastin Tuesday 7 January 2014

The following Razor code is used to check whether an Umbraco Node has children or not.
  1. bool hasChildren = (Model.ChildrenAsList.Count() > 0);
  2. if(hasChildren)
  3. {
  4.     //code
  5. }
  6. else
  7. {
  8.     //code  
  9. }

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Link To This Post/Page

Spread The Word

Add this button to your blog:
JJ Technology Solutions

Blog Archive

Trackers

eXTReMe Tracker
facebook

- Copyright © JJ Technology Solutions - Powered by Source Code Solutions -