You already asked the same question on May 14. Correct? Copy & paste my answer:
*I think that toc variable, unlike toctree (https://www.sphinx-doc.org/en/master/templating.html#toctree <https://www.sphinx-doc.org/en/master/templating.html#toctree>), can't control its depth. They both generate <ul> list and one workaround I'm using is to hide deeper lists with CSS.* *Have a look at this snippet https://codepen.io/mattdocumatt/pen/NWxrQqB <https://codepen.io/mattdocumatt/pen/NWxrQqB> that demonstrates it. * Did it help you? Matt https://blog.documatt.com On Thu, May 14, 2020 at 9:05 AM Magic X <[email protected]> wrote: > Hi, > > I'm going to use the 'toc' variable in a html template to produce local > TOC for the current document in the sidebar, is it possible to control the > TOC max depth? > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/4921d13b-6641-44dc-95f5-d21469189ec7%40googlegroups.com > <https://groups.google.com/d/msgid/sphinx-users/4921d13b-6641-44dc-95f5-d21469189ec7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAOGNDW-mTbhtvwzWHQx0r%2BYSfr%3DgpuE7M3%2BAKi_oKWGsu71yXg%40mail.gmail.com.
