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.

Displaying Comments without Passing URL

October 03, 2011 5:28pm

Subscribe [2]
  • #1 / Oct 03, 2011 5:28pm

    SiamIam

    15 posts

    I’ve reached a roadblock with displaying user comments.

    On the site index page we’re displaying the most recent entry from a channel ... so the URL for this is http://www.websitename.com ... I’m assuming that because we’re not using the url_title in the URL the comment section isn’t displaying.

    I can hard code the entry_id or the url_title into the comment tags and everything shows up, but I need it to be dynamic so when the homepage content automatically changes next month to the latest entry the comment tags also update.

    Is there a way to do this that I’m overlooking?

    Thanks!

  • #2 / Oct 03, 2011 8:05pm

    John St-Amand

    865 posts

    If you are inserting the comment form from within the entries loop, the entry_id for the entry in question would be available to you as a variable.  So commonly I would approach this by inserting the comment form with an embed from within the entries loop, and passing the id for the entry as a variable into the embed, resulting in the comment form being dynamically tied to the entry.

    Does that help?

  • #3 / Oct 04, 2011 6:32pm

    SiamIam

    15 posts

    Perfecto! Thanks so much for the help, that totally worked!

    I thought for some reason you weren’t allowed to put the comment tags inside the entries loop… guess I was wrong.  😊

    Thanks again!

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

ExpressionEngine News!

#eecms, #events, #releases