The topic
variable describes the current topic. It is only available in the Topic template designer.
The structure of topic
is as follows:
{
"tocId": "IIS7zZcAMtq9SgiS6gVupw",
"contentId": "wDGWmDHxJ70v3b3pkmpo0Q",
"title": "Introduction",
"hasRating": false,
"prettyUrl": "r/Reader-Designer/Introduction",
"depth": 1,
"children": []
}
Field | Type | Description |
---|---|---|
tocId |
String | The value of the tocId metadata key for the currently open topic. |
contentId |
String | The value of the contentId metadata key for the currently open topic. |
title |
String | The value of the ft:title metadata key for the currently open topic. |
hasRating |
Boolean | Indicates whether the currently open topic has a rating or not. |
prettyUrl |
String | The URL of the topic. |
depth |
Number | The table of contents hierarchy. 1 corresponds to the highest level of topics. |
parentTocId |
String | The value of the tocId metadata key for the currently open topic's parent topic. |
children |
Array | The same values contained in this table, for children topics of the currently open topic. |