Available Since: V2.0.0
Chunk used to format a blog post comments..
<div class="post-comments"> <p>[[+commentsLabel]]</p> [[comments.show]] <p id="showAllComments"><a href="[[self]]">[[+showAllCommentsLabel]]</a></p> <p id="writeComment"><a href="[[self]]">[[+writeCommentLabel]]</a></p> [[!comments.submit &verification=`1`]]</div>[[javascript &core=`1`]]<script type="application/javascript"> $fl('#submitcomment').css('display', 'none').attr('aria-hidden', 'true'); $fl('#showAllComments').css('display', 'none').attr('aria-hidden', 'true').bind('click', function(e) { $fl('.comments li').css('display', 'block').attr('aria-hidden', 'false'); $fl(this).css('display', 'none').attr('aria-hidden', 'true'); e.preventDefault(); }); $fl('.comments li').each(function(i) { if(i > 2) { $fl(this).css('display', 'none').attr('aria-hidden', 'true'); $fl('#showAllComments').css('display', 'block').attr('aria-hidden', 'false'); } }); $fl('#writeComment').bind('click', function(e) { $fl('#submitcomment').css('display', 'block').attr('aria-hidden', 'false'); $fl(this).css('display', 'none').attr('aria-hidden', 'true'); e.preventDefault(); }); if(!$fl('#submitcomment').length) $fl('#writeComment').css('display', 'none').attr('aria-hidden', 'true'); </script>
Placeholder | Description |
---|---|
commentsLabel | The label for the comments block. |
showAllCommentsLabel | The label text for show all comments clickable element. |
writeCommentLabel | The label text for the clickable write comment element. |