I am looking for some advice on how to display material in a hierarchical table of contents. I have been charged with making the entire contents of a short book available via Bixby. This raises a lot of interesting issues about how to create conversations around the content, when less is more, etc., but the v0 requirement is just to get it all accessible. The content is more or less organized like this:
Part One
Chapter One
Section 1.1
Section 1.2
Image 1.1
Chapter Two
Chapter Three
Section 3.1
Section 3.1.1
I say more or less because there are annoying logical variations like section headings without content or sections that have multiple headlines. The Sections are generally short enough to be good Bixby pages.
The content resides in a restdb with each section of text in its own row. The concept that contains the content is called, unsurprisingly, Content, and it has a contenttype property that can be news, facts, quiz, etc.
My first and basic question is how to create a Table of Contents that correctly displays all these Content objects in the right sequence and a readable format. In other words, the layout will probably be a little more complex than the standard Bixby list view and I will need some mechanism for sorting the returned objects into the right slots.