Origami Frontend Components & Services

Demos: o-comments

This version of o-comments hasn't been branded yet. Please check the latest version, 7.1.4, as branding is a relatively new addition to our components.

Comments

<div class="demos-container">
  <div data-o-component="o-comments" data-o-comments-config-title="Comments demo" data-o-comments-config-url="http://registry.origami.ft.com/components/o-comments" data-o-comments-config-articleid="o-comments-demo">
    <div class="o--if-no-js">To participate in this chat, you need to upgrade to a newer web browser. <a href="http://help.ft.com/tools-services/browser-compatibility/">Learn more.</a></div>
  </div>
</div>

Comment Count

Basic setup

<div data-o-component="o-comments" data-o-comments-count="" data-o-comments-config-article-id="3a499586-b2e0-11e4-a058-00144feab7de">
  Comments
</div>

Comment Count With Custom Template

How to provide a custom template at an individual level

<div data-o-component="o-comments" data-o-comments-count="" data-o-comments-config-article-id="3a499586-b2e0-11e4-a058-00144feab7de" data-o-comments-config-template="This article has {count} comment{plural}.">
  Comments
</div>

Auto Refresh Comment Count

Enable auto refresh: interval of 1 minute

<div data-o-component="o-comments" data-o-comments-count="" data-o-comments-config-article-id="3a499586-b2e0-11e4-a058-00144feab7de" data-o-comments-config-auto-refresh="true">
  Comments
</div>

Defer Comment Count Init

Initialize later

<div data-o-component="o-comments" data-o-comments-count="" data-o-comments-config-article-id="3a499586-b2e0-11e4-a058-00144feab7de" data-o-comments-auto-init="false">
  Comments
</div>

<script>
  setTimeout(function () {
    oComments.init();
  }, 4000);
</script>
Switch component view

GitHub Repository

Install o-comments

If using the Build Service, add o-comments@^5.1.1 to your script and link tags.

If running a Manual Build, run bower install --save "o-comments@^5.1.1".

Help & Support

o-comments is maintained directly by the Origami team. If you have any questions about o-comments or Origami in general, we are happy to help. 😊

Slack: #ft-origami
Email: origami.support@ft.com

Feedback / Issues

To report a bug or request features please create an issue on Github. For support or general feedback please get in touch 😊

Slack: #ft-origami
Email: origami.support@ft.com