ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Using {if allow_comments} not working?

May 05, 2011 12:32am

Subscribe [2]
  • #1 / May 05, 2011 12:32am

    rorourke

    113 posts

    Where is the {allow_comments} flag set? I am trying to do some simple logic with it inside the {exp:channel:entries} tag pair, but not inside the {exp:comment:entries}

    I would have thought this correlates to the “Allow comments” flag in the options tab of the publish page, yet it doesn’t seem to do anything?

    Calling it like so (this is all inside the channel entries tag:

    {if allow_comments == TRUE}
    <h2 class="left">Discussion Enabled</h2>
    <span class="add-comment"><a href="#addcomment"><strong>+ Add to it</strong></a></span>
    {/if}
    {exp:comment:entries sort="asc" limit="20"}
    <div class="comment">
        <div class="inside">
            <div class="date"><strong>{comment_date format="%M"}</strong><em>{comment_date format="%d"}</em><span></div>
            <span class="who"><strong>{name}</strong> had the following to say,<!--, on {comment_date format="%l"} the {comment_date format="%d"} of {comment_date format="%F"}.--></span>                
        {comment}
        </div>
    </div><!--end .comment-->
    {/exp:comment:entries}
  • #2 / May 05, 2011 1:50pm

    Sue Crocker

    26054 posts

    Hi, rorourke.

    The value for allow_comments is either y or n.. see if that makes a difference.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases