{% remote key="newMessageList",api="contentMessage/getMessages",query='{"pageSize":5,"isPaging":"0"}' %}

{% if newMessageList.length > 0 %}
<div class="pannel-box rec-message-list">
    <h2 class="pannel-title">{{__('lc_newComments')}}</h2>
    <div class="content-list">
        <ul>
            {% for item in newMessageList %}
            <li class="message-list">
                <div class="comment-info">
                    {% if item.author %} {% set getAuthor = item.author %} {% else %}
                    {% set getAuthor = item.adminAuthor %} {% endif %}
                    <a href="#" class="logo">
                        <img src="{{ getAuthor.logo}}" alt="">
                    </a>
                    <a href="#" class="uname">{{getAuthor.userName}}</a>
                    <span>{{item.date}}</span>
                </div>
                <div class="comment-excerpt">
                    <p>{{item.content | cutwords(100,false)}}</p>
                </div>
                <p class="comment-post">
                    <a href="{{item.contentId.url}}"
                        class="title">{{item.contentId.title | cutwords(50,false)}}</a>
                </p>
            </li>
            {% endfor %}
        </ul>
    </div>
</div>
{% endif%}