Doc tree - custom landing page
1 min
On a custom landing page, you can build your own doc tree(left navigation).
On the `window` object of the browser, there is the window._archbee_custom object which contains:
console.log(window._archbee_custom)
/**
* {
* showSearch: () => void
* hideSearch: () => void
* navigationTree: PublicDocTree[]
* }
**/
showSearch -> opens search modal
hideSearch -> closes search modal
navigationTree - property that holds a list of all your space documents with associated data to build your left navigation tree.
You need to retrieve the navigationTree from the window._archbee_custom object, iterate through its structure, and dynamically generate navigable HTML elements that maintain the correct order and hierarchy.
JS Script to be used in your landing page code to display the object.
<script>
addEventListener("load", (event) => {
console.log('init', window._archbee_custom);
});
</script>