Custom page variables

Is it possible to have for each page a custom variable like generate-toc?

Based on the value of this variable I want to decide for each page if I want to display a table of contents or not.

You can put anything you want in the [extra] section of the page front-matter: Page | Zola