improve directory listing
Some checks failed
DokuWiki Default Tasks / all (push) Has been cancelled

This commit is contained in:
2026-01-06 11:38:30 +01:00
parent 41580fa010
commit a835f76f90
8 changed files with 107 additions and 15 deletions

View File

@@ -13,6 +13,15 @@ require_once(__DIR__ . '/AbstractSyntax.php');
*/
class syntax_plugin_luxtools_directory extends syntax_plugin_luxtools_abstract
{
/** @inheritdoc */
protected function getDefaultParams(): array
{
return [
// Directory listings should group folders before files by default.
'foldersfirst' => 1,
];
}
/** @inheritdoc */
protected function getSyntaxKeyword(): string
{
@@ -35,6 +44,9 @@ class syntax_plugin_luxtools_directory extends syntax_plugin_luxtools_abstract
return true;
}
// Provide the current directory path so Output can render the "Open Location" link.
$params['openlocation'] = $pathInfo['root'] . $pathInfo['local'];
$crawler = $this->createCrawler($params);
$items = $crawler->listDirectory(
$pathInfo['root'],