Copied to clipboard

Flag this post as spam?

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


  • Kim Rasmussen 81 posts 310 karma points
    Feb 13, 2013 @ 17:26
    Kim 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

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies