Umbraco Contour and razor


/ Published in: C#
Save to your folder(s)

WIP dynamic objects you can use to output contour records on your umbraco site using razor


Copy this code and paste it in your HTML
  1. @using Contour.Addons.Razor
  2. <ul>
  3. @foreach (dynamic record in Library.GetApprovedRecordsFromPage(@Model.Id))
  4. {
  5. <li>
  6. @if(string.IsNullOrEmpty(record.Website)){
  7. <strong>@record.Name</strong>
  8. }
  9. else{
  10. <a href="@record.Website"><strong>@record.Name</strong></a>
  11. }
  12.  
  13. <p>@record.Comment</p>
  14. </li>
  15. }
  16. </ul>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.