Tribe Community Platform

The Tribe Community Platform Developer Hub

Welcome to the Tribe Community Platform developer hub. You'll find comprehensive guides and documentation to help you start working with Tribe Community Platform as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Topic Widget

The topic widget is used to embed posts, questions, or answers related to a particular topic in your website or product.

In the above example, you can see the topic widget under "Related Questions" section. It lists all the questions around a particular topic and users can ask new questions right inside the widget.

Using the JavaScript Snippet
You can use the following script anywhere in the <body /> tag to add the topic widget:

// Make sure you already have Tribe script in the <head /> tag
<div id="topic-widget"></div>
  window.Tribe('topic', {
    id: 'topic-widget',     
    slug: 'test-topic',
    components: ['breadcrumb', 'sidebar', 'header', 'suggestions', 'input'],
    feedLimit: 5

Below you can find all available options for this widget:

String nullThe ID of the div to append the widget to
topicIdString nullThe widget will show the content tagged with the defined topic ID. This option is required if slug is not set.
slugString nullThe widget will show the content tagged with the defined topic slug. This option will be ignored if topicId is set.
componentsArray of breadcrumb, sidebar, header, suggestions, input['breadcrumb', 'sidebar', 'header', 'suggestions', 'input']Defines which elements should be displayed in the widget.
feedLimitInteger nullIf defined, it will limit the number of items in the feed and displays a "Show more" button instead of infinite scroll.
Can be posts, questions, articles, or discussions.
nullIf defined, will only display the input box and feed of the particular type. The values can be different based on the Url under "Content Types" settings.

Using Iframe
If you are not allowed or don't want to add JavaScript to your page, or want to embed the widget in a WebView on phone you can use the following URL and pass the options as query string:

<<community_url>>/embed/topic/{slug or topicId}/{type}


Please note that the /{type} part is optional. If it's not set, you'll receive a feed of all types.

Here is an example inside an <iframe /> tag:

  style="min-height: 300px; width: 100%;"

Updated 3 months ago

Topic Widget

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.