1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 17:23:00 +00:00

more of the same - this time in page / tag lists

This commit is contained in:
Starbeamrainbowlabs 2020-08-31 21:02:49 +01:00
parent 23998f60bf
commit dfca17d1cf
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -1,7 +1,7 @@
<?php <?php
register_module([ register_module([
"name" => "Page list", "name" => "Page list",
"version" => "0.11.3", "version" => "0.11.4",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Adds a page that lists all the pages in the index along with their metadata.", "description" => "Adds a page that lists all the pages in the index along with their metadata.",
"id" => "page-list", "id" => "page-list",
@ -102,9 +102,8 @@ register_module([
case "html": case "html":
$content = "<h1>All tags</h1> $content = "<h1>All tags</h1>
<ul class='tag-list'>\n"; <ul class='tag-list'>\n";
foreach($all_tags as $tag) foreach($all_tags as $tag) {
{ $content .= " <li><a href='?action=list-tags&amp;tag=" . rawurlencode($tag) . "' class='mini-tag'>$tag</a></li>\n";
$content .= " <li><a href='?action=list-tags&tag=" . rawurlencode($tag) . "' class='mini-tag'>$tag</a></li>\n";
} }
$content .= "</ul>\n"; $content .= "</ul>\n";
@ -276,7 +275,7 @@ function generate_page_list($pagelist)
{ {
foreach($pageindex->$pagename->tags as $tag) foreach($pageindex->$pagename->tags as $tag)
{ {
$tags .= "<a href='?action=list-tags&tag=" . rawurlencode($tag) . "' class='mini-tag'>$tag</a>, "; $tags .= "<a href='?action=list-tags&amp;tag=" . rawurlencode($tag) . "' class='mini-tag'>$tag</a>, ";
} }
$tags = substr($tags, 0, -2); // Remove the last ", " from the tag list $tags = substr($tags, 0, -2); // Remove the last ", " from the tag list
} }