1

My client wants an RSS feed link near her comments form so users can subscribe to comments, which would update whenever someone posts a new comment. It's been quite a while since I've done something like this, so I'm kind of drawing a blank here.

I thought initially I could simply pull in the entry_id into the channel entries, but then I realized that I'm not using the channel entry_id in the URL (using title path), so where does it pull the entry info from to know for which post the comments should be displayed?

Is this just a case of using dynamic="on" (or "yes" or whatever we're calling it these days)?

Thoughts? Help? Pointing and laughing? :) I appreciate any insight here. Thanks!

  • Sorry for all my fumbling in here, I've not posted much here before. :)
3
  • title path also can be pulled for entries info. url_title="{segment_2}" for example. That?
    – lealea
    Commented Mar 25, 2013 at 18:22
  • thanks! yes, I was JUST tinkering with that as you sent this. You were reading my mind, lea. ;) Commented Mar 25, 2013 at 18:32
  • Lea, I ended up using entry_id via the link and right in the comments tag as Ian recommended below. Totally worked. Thanks for replying! :) Commented Mar 25, 2013 at 20:11

1 Answer 1

0

Did that solve it for you Joelle? You can also pass in the entry_id as a parameter such as:

{exp:comment:entries entry_id="{entry_id}" }
   ...
{/exp:comment:entries}
4
  • Hi Ian, thanks. I'm still trying to get this to work. I think perhaps I'm not structuring my template correctly. I'm getting the comments now, but I'm also getting the error. The link to the feed is structured like this: <a href="{path=feed/comments}/{entry_id}">Subscribe to Comments</a> This seems to work just dandy. But it spits out an error as well as the comments: error on line 65 at column 11: Opening and ending tag mismatch: ol line 0 and channel Commented Mar 25, 2013 at 20:00
  • Hi again. Just letting you know that my error was due to a misplacement of a bit of code inside the <item> area. All fixed. :) Thank you for responding! Commented Mar 25, 2013 at 20:10
  • No problem. The template didn't look like it was set to output an XML document though so if it's going to be subscribed to then you may need to make sure the output is a well-formed XML document with the correct headers sent. Here's an example RSS feed which may be useful if you still have problems: ellislab.com/expressionengine/user-guide/_downloads/…
    – Ian Young
    Commented Mar 25, 2013 at 20:15
  • Thanks, Ian. it was set to output XML, I just couldn't figure out how to post the code here without it stripping that out. :) Commented Mar 25, 2013 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.