{sitemap}...{/sitemap} walks the application's directories and makes a row of every page - in PAD every page is a file, so no list of routes is needed to know them. Each row has page (docs/intro), url (the absolute address, ?docs/intro, or the clean form under $padCleanUrls) and lastmod (Y-m-d, the newest of the page's files). The rows come per directory: its index first, then its other pages, then its subdirectories; a directory's index has the directory as its url.

Left out are the entries that are no pages to visit: _ and dot entries, a directory holding a _guard.php, a bracketed route (products/[id]), a page with no template whose PHP only redirects, restarts or writes, a page whose template says {meta sitemap=false}, and every page or directory listed in $padSitemapSkip.

A first parameter limits the list to one directory - {sitemap 'docs'} - for a menu of a section. The rows are ordinary data, so the handling options apply: first=, where=, sort='lastmod DESC' for "recently changed".

With $padSitemap = TRUE in the configuration the same list answers ?sitemap.xml as the sitemap protocol's XML, and ?robots.txt points to it, as long as the application has no page of that name.