Get started Pricing

Building Menus

Once a bunch of content has been stored, the next step is often to retrieve the structure or particular folders in order to build menus.

List notes in a folder

var list = await pn.list("blog");

This returns an array of notes at the given path, as well as useful surrounding pages:

  • parents - for breadcrumb trails
  • parent - immediate parent folder
  • siblings - other notes in the same folder
  • children - if the current path is also a folder

List all notes

Sometimes you just want to build a whole tree structure yourself, in which case use getAll()

var all = await pn.getAll();

Which simply returns a flat array of all notes in your database.

Note: all list operations return summary notes (without content) for brevity


Developers Blog T&Cs Privacy