Skip to main content
Use an html block to build your own navigation: a menu, a launcher or a landing page. evidence.pages() returns only the pages the current viewer can open, so each viewer sees a menu built for them.

What evidence.pages() returns

await evidence.pages() resolves to an array of pages: What’s in the list depends on where the page is viewed: In published reports the list matches the sidebar: top-level pages and pages one folder deep. Pages nested deeper can still be opened but aren’t listed. With the CLI, deeper pages are listed under their top-level folder. Always handle an empty list, so the block still renders something sensible.
Hiding a link doesn’t stop anyone opening the page. access.yaml is what enforces access, so a viewer who opens a page they can’t access gets a 404 whether or not your menu lists it. Use this pattern to tidy up navigation, not to secure pages. Users with the Developer, Admin, or Org Viewer role see every page.
Internal <a href> links route the same way as markdown links, so they work in published reports, the editor and the CLI.

Show a Section Only to Viewers Who Can Open It

Check the list before rendering a card. Here the Finance card only appears for viewers who can open at least one page in the finance folder.
Replace sales-reports with your project’s slug. Locally with the CLI, paths have no project prefix, e.g. /finance/. A search box that filters the viewer’s pages as they type. Press Enter to open the first match.