Get · Mecha CMS

Data caller.

$get::pages()

Author: Taufik Nurrohman · 239 Views

Tweet

Plugged by page extension.

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

Example:

List all published and archived pages from lot\page\blog and sort them by slug ascending:

$files = Get::pages('.\www\lot\page\blog', 'page,archive', [1, 'slug']);

List all published and archived pages from lot\page\blog and sort them ascending by slug, output only the path property of each item returned:

$files = Get::pages('.\www\lot\page\blog', 'page,archive', [1, 'slug'], 'path');