feat(Modules): add modules list module

This commit is contained in:
Matthieu Bessat 2021-10-03 10:57:00 +02:00
parent 2b64fe576f
commit c677114e08
2 changed files with 26 additions and 0 deletions

View file

@ -3,6 +3,7 @@
return [ return [
'domain' => 'lefuturiste.fr', 'domain' => 'lefuturiste.fr',
'modules' => [ 'modules' => [
'modules' => [],
'random' => [], 'random' => [],
'date' => [ 'date' => [
'alias' => ['printdate'] 'alias' => ['printdate']

View file

@ -0,0 +1,25 @@
<h1> List of modules </h1>
<?php
echo "<ul>\n";
foreach ($config['modules'] as $name => $moduleConf) {
if ($name == 'modules') { continue; }
?>
<li>
<a href="http://<?= $name . '.' . $config['domain'] ?>"><?= $name ?></a>
<?php
if (isset($moduleConf['alias'])) {
echo ' : ';
foreach ($moduleConf['alias'] as $alias) {
?>
<a href="http://<?= $alias . '.' . $config['domain'] ?>"><?= $alias ?></a>,
<?php
}
}
?>
</li>
<?php
}
echo "</ul>";