---
title: "How do I generate a table of contents on custom templated documents?"
description: "If you are using one of the Standard Template Files rather than the out of the box documents, you will notice that there is a {@toc} placeholder for the Table of Contents data. This accesses a Microsoft Word variable and does not automatically generate the table of contents."
category: "Frequently Asked Questions"
section: "General"
keywords: ["contents", "table", "templated documents", "generate", "update", "upload", "document", "custom"]
source_url: "https://support.ketryx.com/hc/en-us/articles/36060719826317-How-do-I-generate-a-table-of-contents-on-custom-templated-documents"
last_reviewed: 2026-06-11
---

# How do I generate a table of contents on custom templated documents?

> **In short:** If you are using one of the Standard Template Files rather than the out of the box documents, you will notice that there is a {@toc} placeholder for the Table of Contents data. This accesses a Microsoft Word variable and does not automatically generate the table of contents.

If you are using one of the [Standard Template Files](https://docs.ketryx.com/reference/document-templating#standard-template-files) rather than the out of the box documents, you will notice that there is a {@toc} placeholder for the Table of Contents data. This accesses a Microsoft Word variable and does not automatically generate the table of contents.

**Option 1:**

To generate your table of contents using a Standard Template File with the {@toc}:

1. Download and open the document
2. Right or control click on the "No table of contents entries found" statement
3. Select "Update Field"

4. Observe that the Table of Contents is as desired
5. Optional: undo the update and consider using "Toggle Field Codes" to update the number of headers as needed
6. Reupload the document to Ketryx by going to the generated document, click the history button, and then select "Upload new revision"

**Option 2:**

Alternatively, you can create a custom Table of Contents that will generate automatically without needing the re-upload by using itemContent, which renders a bookmark link in the background. An example of this is below (replace the {@toc} with the code below):

|     |     |     |     |
| --- | --- | --- | --- |
| {#items}{($index + 1)}. | {@ item.id\|bookmarkLink:docId} | {title} | {@ item.id\|bookmarkLink}{/} |

Tip: Use a table to format this as desired, but make the table lines invisible in your actual document.

If you have additional questions or need assistance with a particular document templating use case, [reach out to our client operations team](https://support.ketryx.com/hc/en-us/requests/new).

## Related articles

- [How can I generate ATs in my templated documents?](how-can-i-generate-ats-in-my-templated-documents.md)
- [Can I change the timezone on my templated documents?](can-i-change-the-timezone-on-my-templated-documents.md)
- [How do I generate release documents?](how-do-i-generate-release-documents.md)
- [How can I define custom document IDs?](how-can-i-define-custom-document-ids.md)
- [Why do systems documents and templated documents have different behavior for prompting re-generation?](why-do-systems-documents-and-templated-documents-have-different-behavior-for.md)
