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 not rendering on main page

November 26, 2008 12:41pm

Subscribe [2]
  • #1 / Nov 26, 2008 12:41pm

    Daniel H.

    22 posts

    I’m running into another bug. I need to put a comment form on the page… And it’s not working on the main page. I see a form on the individual entry version of the page, but on the default (latest entry) page, it won’t draw a form.

    I’m using the standard comment form found here.

    Do I need to specify what entry it’s for? Or embed the comment form/tag within the weblog tag (the docs say not to embed, by preference, I believe I saw)?

    -Daniel

    [Mod edit: Split from this thread]

  • #2 / Nov 26, 2008 12:59pm

    Sue Crocker

    26054 posts

    Hi, Daniel.

    The comment form by design is a single entry form that expects to see either an entry_id or a url_title in the segment_3 to know what to do.

    So yes, you do need to specify which one it is form.

  • #3 / Nov 26, 2008 2:08pm

    Daniel H.

    22 posts

    So, can I do something like:

    {exp:weblog:entries weblog="video" limit="1" dynamic="off"}
    {exp:comment:form weblog="video" entry_id="{entry_id}"}

    Something like that?

    I guess, outside of storing the entry id into a PHP variable using PHP parsing, I’m not sure how to tell the comment tag which entry I’m looking at, without it being embedded in my weblog tag. I should probably just try it and find out, but I’m short on time today, it seems.

    Sorry for all the questions. Just trying to find the “optimal” way to do these things.

    -Daniel

  • #4 / Nov 26, 2008 3:05pm

    Pascal Kriete

    2589 posts

    Daniel,

    You can embed the comment form in another template and pass the entry id as an embed variable as shown here.

    Let me know if that helps.

  • #5 / Nov 26, 2008 3:15pm

    Daniel H.

    22 posts

    Ok, the example I posted above DOES work, so I’m all set to go now. Thanks, everyone!

    And thanks Pascal, I’d love to break this template down into pieces, but the requirement was an all in one template. 😊

    -Daniel

  • #6 / Nov 26, 2008 3:26pm

    Pascal Kriete

    2589 posts

    It works, that’s what counts.

    Don’t hesitate to open another thread if anything else comes up.

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

ExpressionEngine News!

#eecms, #events, #releases