24

I have been trying to find a way to have a table of contents of the subpages within the Azure DevOps Wiki. I have found, from other wiki services, how to do it.

In Confluence, they have a macro for "Children Display"

Another way I found for another wiki service: [Special:PrefixIndex/Help:Subpages/]

artless noise
  • 21,212
  • 6
  • 68
  • 105
DoubleDev
  • 421
  • 1
  • 3
  • 7

3 Answers3

15

Azure DevOps now has a Subpages Table of Contents tag! Just Enter [[_TOSP_]] and all the subpages will be displayed. It is can also be inserted from the menu, but it's hidden behind the ellipses.

enter image description here

Daniel Gimenez
  • 18,530
  • 3
  • 50
  • 70
  • Partially true. It works on Azure DevOps Services, but not on Azure DevOps Server. But maybe it will appear in an update. – bla Feb 17 '23 at 13:14
14

I am afraid there is not exactly the same feature(Confluence: Children Display) in Azure Devops.

In Azure Devops, the wiki page has the Table of contents(TOC) markdown.

enter image description here

This feature is similar to Children Display, but it can only connect to its own child pages.

It has limitations and cannot connect to subpages other than its own page.

If you want to connect to other subpages, you need to use link markdown.

But it cannot add a table of contents of the subpages.

Therefore, the features in the Azure Devops wiki cannot meet your requirements for the time being.

Here are the suggestion tickets in our UserVoice Site.

Wiki macro for displaying child pages

Table of contents should consider subpages

Many Users have the similar requirements, you could vote and add comment in the suggestion tickets.

Kevin Lu-MSFT
  • 20,786
  • 3
  • 19
  • 28
  • 17
    Please consider clarifying your answer. The `[TOC]` markdown does not involve child or subpages. Instead it aggregates its containing page's headings ONLY, i.e. lists only the lines beginning with one or more pound signs ('#'). – ScottWelker Oct 21 '21 at 15:06
  • This answer is obsolete now. Please see https://stackoverflow.com/a/75298431/2497335. – Daniel Gimenez Feb 12 '23 at 13:55
8

You can also work around the issue by putting links in # headers after the [[_TOC_]].

##### [Name of page](/path/to/page)

Then it will show up in your table of contents. I also use this at the very top of a sub page to navigate back to home. If you put this before the [[_TOC_]] it won't be in the table but will still show up at the top.

##### [Back to home page](/Home-Page)
  • I find this work-around to be troublesome. The link text isn't reliably rendered in the table of contents. Sometimes it works OK. Sometimes it does not (seemingly depending on the characters in your `Name of page`). A variation I use (only when I REALLY must) is to use the literal text (Name of Page) in my heading and then follow that, on the next line, with the actual link to the page. Not great. – ScottWelker Oct 21 '21 at 15:12