Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Kim Bantz Rasmussen 81 posts 310 karma points
    Feb 13, 2013 @ 17:26
    Kim Bantz Rasmussen
    0

    List of comments - Razor

    Hi,

    I'am having trouble getting the comments snippet to work properly.

    I'am using the included Comments form and using this nice little razor snippet: http://www.nibble.be/?p=102

    @inherits umbraco.MacroEngines.DynamicNodeContext
    
    @using Contour.Addons.DynamicObjects
    
    <ul id="comments">
    
    @foreach (dynamic record in Contour.Addons.DynamicObjects.Library.GetApprovedRecordsFromPage(@Model.Id).OrderBy("Created"))  
     {
         <li>
              @record.Created.ToString("dd MMMM yyy")
    
              @record.Email
    
    
             @*
    
              @if(string.IsNullOrEmpty(record.Website)){
                 <strong>@record.Name</strong>
              }
              else{
                 <strong>
                   @record.Name
                 </strong>
              }
             <span>said</span>
            <p>@record.Comment</p>
                 *@
         </li>
      }
    </ul>

    My problem is, that I can't get the field value of 'Name' and 'Comment'. I can get the values of 'Email' and created date.

    Best regards

    Kim

     

Please Sign in or register to post replies

Write your reply to:

Draft