Livefyre - Multiple Conversations on one Page?

616 views Asked by At

I use Livefyre as my commenting system. This works very well at the moment as each page thatr has comments is actually a separate HTML file.

We are investigating a radical site re-design, and one of the new features we will be having is all content being loaded via AJAX calls into one core page.

This has a few implications from a commenting point of view:

  1. When articles are streamed via the ajax calls, they will become part of the container's DOM
  2. This means that the Livefyre widget will be dynamically created after all the AJAX data becomes available

The challenge is, when commenting, the Livefyre widget will comment on a conversation linked to the container DOM and not to the streamed AJAX content

So my question is, how can I setup multiple livefyre conversations on one page to accommodate the AJAX content I will be streaming (the conversation should be linked to the AJAX content and not to the containing page)

Thanks in advance, looking forward to see if we can solve this one

1

There are 1 answers

1
bengo On

Do you intend to have two or more separate Comments widgets on the page? Or will the user only have one in focus at a time, and you want to be able to change the conversation that the widget is showing?

If the latter, the changeCollection method mentioned here is probably want you want: https://github.com/Livefyre/livefyre-docs/wiki/JavaScript-API#wiki-change-collection

If the former, you want to dynamically create new widgets in new elements based on the AJAX Content, that is not currently possible. The fyre.conv.load method that loads the Comments application and renders it in an element can only be called once.