// check if filename is larger than three chars and if the // file ends with ".md" if (strlen($navblog) >= 3 && substr($navblog, -3) == ".md") { if ($getblog == "") { // Run when on main blog if ($navblog != "main.md") { // excluding main blog // creating navigation item BlogListGenerator::listBlog("./blogs/", $navblog, $blogtitle); } } else { // Check if $blog is current blog // -> this blog will be excluded if ($getblog . ".md" != $navblog) { // creating navigation item BlogListGenerator::listBlog("./blogs/", $navblog, $blogmaintitle); } } } } echo "</section>"; } elseif (isset($getarticle) || isset($gettag)) { // If viewing a blog or a tag ?> <!-- Set a back item instead of the blogs. --> <a class="nav-item" onclick="goBack()">Go back</a> <?php } if ($bloghome == "yes") { // If a blog home is existend ?>