Hide book components from TOC / do not include in TOC.xml file
Use case
From documentation in #211 (closed)
Some books have a sidebar on the Bookshelf site, for example the "GeneReviews Links" section for the GeneReviews Book, which displays selected book components instead of including these in the TOC.
Workflow
- User indicates in the metadata table of the Word source file that it should not be included in the TOC.
- When the file is converted to xml this becomes a processing instruction
<?hideTOC?>
in the book component metadata. - Any file with
<?hideTOC?>
displays a flag with a tooltip on book manager - Any file with
<?hideTOC?>
does not get included in the TOC.xml that the BCMS generates
Design
See #1018 (closed)
Dev tasks
Sample files:
-
When <?hideTOC?>
exists, do not include the book component in the TOC.xml that the BCMS generates -
When <?hideTOC?>
exists, display "Hidden from TOC" flag on book manager
See converted xml top-level structure here: https://gitlab.coko.foundation/ncbi/ncbi/-/wikis/Workflows/Word-source-books#placement-in-frontbodyback
QA Steps
- Upload sample source file and submit
- When file has converted, check it displays the hide-toc icon
- Publish the chapter and the TOC to confrim the chapter does not get added to the TOC.