nieuws: fix relative image paths in toc
[minimedit.git] / widget / nieuws.php
index c12efc8db3348b5b262f1c24dfe77357832bc4d5..dd019a3be60abcfee2dd1ade4375646edfc09f0d 100644 (file)
@@ -44,7 +44,7 @@ function printtoc($input, $class = FALSE)
                $html .= sprintf(' <small class="date">%s</small>', showdate($dateparts));
                if ($class == 'gallery' and $article->img) {
                        $html = "<div>$html</div>";
-                       $html = sprintf('<img src="%s" />', $article->thumb(200)) . $html;
+                       $html = sprintf('<img src="/%s" />', $article->thumb(200)) . $html;
                }
                $html = sprintf('<a href="/%s">%s</a>', $article->link, $html);
                print "<li><article>$html</article></li>\n";
@@ -53,7 +53,7 @@ function printtoc($input, $class = FALSE)
 }
 }
 
-$articles = (ltrim($Page->path, '/') ?: 'nieuws');
+$articles = $Page->place[0] ?? 'nieuws';
 if (strpos($articles, '/') === FALSE) {
        if (@$Page->place['view'] === 'toc') {
                print "<div>\n";