Show sections only if entry has at least one comment

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Matthias2
Regular
Posts: 71
Joined: Sun Sep 17, 2006 2:22 pm

Show sections only if entry has at least one comment

Post by Matthias2 » Sat Jan 02, 2021 7:49 pm

Hi at all,

in themes like 2k11 or bootstrap4 I would display this section only if one entry has at least one comment:

Code: Select all

 <section id="comments">
        <h3>{$CONST.COMMENTS}</h3>

        {serendipity_printComments entry=$entry.id mode=$entry.viewmode}
    </section>
{if $entry.has_comments} seems not working. Is there a right condition working for me?

Many thanks.

Post Reply