title: Query: Items Directive
role: manual
tags: #manual #search #zettelstore
syntax: zmk
back: 00001007700000 00001007720000
backward: 00001007700000 00001007720000
box-number: 1
copyright: (c) 2020-present by Detlef Stern <ds@zettelstore.de>
created: 20230729102142
forward: 00001000000000 00001007030200 00001012000000
lang: en
license: EUPL-1.2-or-later
modified: 20251212134003
published: 20251212134003
visibility: public

The items directive works on zettel that act as a &ldquo;table of contents&rdquo; for other zettel.
The [initial zettel](00001000000000) of this manual is one example, the [general API description](00001012000000) is another.
Every zettel with a certain internal structure can act as the &ldquo;table of contents&rdquo; for others.

What is a &ldquo;table of contents&rdquo;?
Basically, it is just a list of references to other zettel.

To retrieve the items of a zettel, the software looks at first level [list items](00001007030200).
If an item contains a valid reference to a zettel, this reference will be interpreted as an item in the items list, in the &ldquo;table of contents&rdquo;.

This applies only to first level list items (ordered or unordered list), but not to deeper levels.
Only the first reference to a valid zettel is collected for the table of contents.
Following references to zettel within such a list item are ignored.

    # curl 'http://127.0.0.1:23123/z?q=00001000000000+ITEMS'
    00001001000000 Introduction to the Zettelstore
    00001002000000 Design goals for the Zettelstore
    00001003000000 Installation of the Zettelstore software
    00001004000000 Configuration of Zettelstore
    00001005000000 Structure of Zettelstore
    00001006000000 Layout of a Zettel
    00001007000000 Zettelmarkup
    00001008000000 Other Markup Languages
    00001010000000 Security
    00001012000000 API
    00001014000000 Web user interface
    00001017000000 Tips and Tricks
    00001018000000 Troubleshooting