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.

Comment Form Won't Show Up No Matter What

April 26, 2011 11:59pm

Subscribe [2]
  • #1 / Apr 26, 2011 11:59pm

    nateluzod

    1 posts

    This question may be related to a resolved thread.

    Hello - I’m having some real difficulty getting my comment form to appear.

    Here’s what I’ve done so far.

    1. Comments are turned on for the channel.
    2. Comments are turned on for the entry.
    3. Conditionally including “single” blog view based on URL:

    {if segment_2 == "entry"}
        {embed="blog/.single"}
      {if:elseif !segment_5 AND segment_3}
        {embed="blog/.archive_listing"}
      {if:else}
        {embed="blog/.listing"}
      {/if}

    4. URL contains url_title in segment_3

    <a href="http://localhost/index.php/blog/entry/the_perfect_chinese_tea_ceremony">http://localhost/index.php/blog/entry/the_perfect_chinese_tea_ceremony</a>

    5. Here is the code for the page:

    {exp:channel:entries channel="blog" url_title="{segment_5}" limit="1"}
        <span class="date">{entry_date format="%F %d %Y"}</span>    
        <h2><a href="http://{path=blog}/{url_title}">{title}</a></h2>
    <p>    {if blog_main_image}<br />
          {blog_main_image}<br />
        {/if}<br />
        {if blog_intro}<br />
          {blog_intro}<br />
        {/if}<br />
        {if blog_body}<br />
          {blog_body}<br />
        {/if}<br />
        {share_this}    <br />
    {/exp:channel:entries}  <br />
    {exp:comment:form channel="blog"}<br />
        <input type="text" name="name" value="{name}" id="name" size="37" /><br />
        <input type="text" name="email" value="{email}" id="email" size="37" /><br />
        <textarea name="comment" rows="8" cols="35" id="comment" >{comment}</textarea><br />
        <input type="submit" name="submit" value="Submit" /><br />
    {/exp:comment:form}

    This is running on v2.1.1

    Been trying to get this for 2 hours now. Any help would be greatly appreciated.

  • #2 / Apr 27, 2011 9:34am

    Sue Crocker

    26054 posts

    Welcome to the ExpressionEngine forums, Nate!

    url_title=”{segment_5}”

    Your code is looking for the url_title in segment_5, but you have it in segment_3. Try changing that, and you should be OK.

    Does that help?

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

ExpressionEngine News!

#eecms, #events, #releases