Querying elements

In a static query we know what element type we expect (for instance a field), where we expect it (for instance at the document root) and what key that element has (for instance 'author'):

document.field('author')

All element types that exist in eno can be queried in that same way:

document.field('author')
document.list('files')
document.list('files').items
document.fieldset('image')
document.fieldset('image').entry('src')
document.section('content')
# etc.

The document itself is a section (only without a key), and all queries you can perform on a document you can perform on a section as well:

document.section('content').field('title')
document.section('content').section('translated').section('dutch').list('tags')

When you expect multiple elements you just use the plural:

document.fields('author')
document.lists('files')
document.fieldsets('image')
document.sections('content')

Next page: Optional/required