Mecha CMS

Data getter.

Get::pages()

Plugged by page extension.

2.0.02.2.0static
Get::pages(string $folder = PAGE, string $state = 'page', $sort = [-1, 'time'], string $key = null): Anemon;

Example:

// List all published and archived pages from `.\lot\page\article` folder
// and sort them by `slug` ascending and output only the `slug` property of each item returned
$A = Get::pages('.\lot\page\article', 'page,archive', [1, 'slug']);

// List all published and archived pages from `.\lot\page\article` folder
// and sort them by `slug` ascending and output only the `path` property of each item returned
$B = Get::pages('.\lot\page\article', 'page,archive', [1, 'slug'], 'path');