Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-11-15 21:56:41
- scdoody
- Member
- Registered: 2006-10-18
- Posts: 129
Comments OFF for all articles in a section
I want to turn commenting OFF for all articles in a section called “articles”.
I know I could just check the radio button to “comments off” when I post the article. However, I don’t want to have to rely on the user to do this.
So I am thinking I can use a <txp:if_articles> <txp:else /> tagset – but I don’t know which form to put this on.
I have three comment forms:
comments_display
comments
comment_form
pop_up comments
I tried putting it on comments such as the following – but it didn’t work:
_________________________________
<txp:if_articles>
hello
<txp:else />
<txp:comment_message />
<p class=“small”>— <txp:comment_name /> · <txp:comment_time /> · <txp:comment_permlink>#</txp:comment_permlink></p>
</txp:if_section>
_________________________________
Any ideas for how to make this work?
Offline
#2 2007-11-15 22:29:52
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Comments OFF for all articles in a section
You want <txp:if_section name="articles">
not <txp:if_articles>
. And you’ll want to put it in your “comments_display” form.
Offline
Re: Comments OFF for all articles in a section
err for future reference, refer to http://textbook.textpattern.net/wiki/index.php?title=Alphabetical_Tag_Listing so you don’t accidentally make up some txp tags :)
Offline