Use Topic API - Fluid Topics - 3.8 - Technical Notes

Develop Connectors with the Fluid Topics API

Product
Fluid Topics
Fluid Topics Version
3.8
Category
Technical Notes
Language
English
Target Audience
public

A Topic is typically composed of an ID, a title, an HTML body, and one or more child topics (i.e. subsections in the Table of Contents).

The following lines show how to build Topics:

from fluidtopics.connector import Topic

sub_topic = Topic.create(
content_id="child-content-id",
title="Child topic title",
body="<p>Body of the <strong>child</strong> topic</p>"
)

topic_A = Topic.create(
content_id="content-a-id",
title="Topic A title",
body="<p>Body of the topic <strong>A</strong></p>",
children=[sub_topic]
)

topic_B = Topic.create(
content_id="content-b-id",
title="Topic B title",
body="<p>Body of the topic <strong>B</strong></p>",
children=[]
)

The following screenshot illustrates how Topics are displayed in a list of search results:

topics