Help - Search - Members - Calendar
Full Version: Changing comment link
Movable Type Community Forum > Additional Resources > Tips and Tricks
jry1209
How can I change it so that when then clicking on the comment link under a post rather then a seperate comment window opening up, having it simply go to the full article for that post with the comment feature below?
Dexter
You'll have to change the templates for every place you want to do this. Main Index, Category Archive, and any Date Based archives you have.

Find this in the old template code
CODE
    <MTEntryIfAllowComments>
    | <a href="<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false">Comments (<$MTEntryCommentCount$>)</a>
    </MTEntryIfAllowComments>


and replace it with this
CODE
    <MTEntryIfAllowComments>
    | <a href="<$MTEntryPermalink$>#comments">Comments (<$MTEntryCommentCount$>)</a>
    </MTEntryIfAllowComments>
jry1209
Thanks a lot. Worked like a charm.
jry1209
Forgot one thing though, how can I do it so that the actual entry shows above the comments themselves on that page?
oscarf
In your individual entry archive template, look for the form element:
CODE
<form method="post" action="<$MTCGIPath$>sub-to-com.cgi" name="comments_form" onsubmit="if (this.bakecookie[0].checked) rememberMe(this)">
and right after that, if it is not there, insert the following:
CODE
<input type="hidden" name="static" value="1" />


See if that gets it done ...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.