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 »

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.
alvatitus
Posts: 1
Joined: Thu Jan 13, 2022 9:50 am

Re: Show sections only if entry has at least one comment

Post by alvatitus »

Sorry if I'm being annoying but could I please get an answer?
Post Reply