Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-13 01:33:23

theinterned
New Member
From: Montreal, Canada
Registered: 2007-08-13
Posts: 9
Website

Comment Preview appears Twice

hi,

here is the site I am working on:
http://nanaimo.theinterned.net/stories/what-are-your-memories-of-nanaimo

for some reason the comment preview appears twice (once where I put it in page above the comments, and once inside the comment form!)

I can’t figure it out!

here is the relevent code:

Page template:
<txp:aam_typogrify>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head> <meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />

<title><txp:page_title /></title> <link rel=“stylesheet” type=“text/css” href=”/_lib/css/main.css”> <txp:feed_link flavor=“atom” format=“link” label=“Atom” /> <txp:feed_link flavor=“rss” format=“link” label=“RSS” />

<txp:css format=“link” />
</head>
<body class=”<txp:section />”>

<!— accessibility —>
<div id=“accessibility”> <ul> <li><a href=”#content”><txp:text item=“go_content” /></a></li> <li><a href=”#sidebar-1”><txp:text item=“go_nav” /></a></li> <li><a href=”#sidebar-2”><txp:text item=“go_search” /></a></li> </ul>
</div>
<!— accessibility end —>

<div id=“container”> <div id=“head”> <txp:output_form form=“mainNav” /> <h1><txp:link_to_home><txp:site_name /></txp:link_to_home></h1> <h2><txp:site_slogan /></h2> </div> <!— head end —>

<!— content —> <div id=“content”> <div id=“col1”> <txp:article limit=“5” /> <div class=“commentForm”> <txp:if_comments_allowed> <h3>Get Writing Now</h3> <txp:comments_form /> <txp:else /> <p><txp:text item=“comments_closed” /></p> </txp:if_comments_allowed> </div> <!— commentForm end —> <txp:output_form form=“gCal” /> </div> <!— col1 end —>

<div id=“col2”> <txp:if_comments_preview> <div id=“cpreview”> <txp:comments_preview /> </div> </txp:if_comments_preview> <txp:comments sort=“posted DESC” /> </div> <!— col2 end —> </div> <!— content end —> <div id=“foot”> <txp:output_form form=“footer” /> </div> <!—footer end —>

</div>
<!— conteainer end —>
</body>
</html>
</txp:aam_typogrify>

comment_form Form
<txp:comments_error wraptag=“ul” break=“li” />
<label for=“name”><txp:text item=“comment_name” /></label>
<txp:comment_name_input />
<label for=“email”><txp:text item=“comment_email” /></label>
<txp:comment_email_input />
<label for=“message”>Story</label>
<txp:comment_message_input />
<txp:comments_help />
<txp:comment_preview />
<txp:comment_submit />

comments Form
<h3><txp:comment_name /></h3>
<txp:comment_message />
<p class=“time”><txp:comment_permlink><txp:comment_time /></txp:comment_permlink></p>
<txp:if_comments_preview>
<p class=“cancel”><txp:permlink title=“Scrap this story!”>Cancel</txp:permlink>
</p>
</txp:if_comments_preview>

any help would be greatly appreciated!

Last edited by theinterned (2007-08-13 01:40:30)

Offline

#2 2007-08-13 07:51:49

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,349
Website GitHub Mastodon Twitter

Re: Comment Preview appears Twice

In preferences do you have “Automatically append comments to articles?” set to no?

Also a tag trace would be useful.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2007-08-13 12:54:04

theinterned
New Member
From: Montreal, Canada
Registered: 2007-08-13
Posts: 9
Website

Re: Comment Preview appears Twice

Yes, I have “Automatically append comments to articles?” turned off.

I don’t know what a “Tag Trace” is. But I would be glad to provide on e if you could tell me.

ned

Last edited by theinterned (2007-08-13 12:54:38)

Offline

#4 2007-08-13 13:29:56

theinterned
New Member
From: Montreal, Canada
Registered: 2007-08-13
Posts: 9
Website

Re: Comment Preview appears Twice

okay,

I figured it out; I was just tired last night!

http://textpattern.com/faq/215/comment-input-form-changes

I just need to include show_preview=0 i the comment form like so:

<txp:comments_form show_preview=0/>

simple!

Offline

Board footer

Powered by FluxBB