Only show MOTD title if it is set

This commit is contained in:
Markus Wang Halvorsen 2018-02-13 17:02:03 +01:00
parent 1db31b9e56
commit f2a14f3791
1 changed files with 5 additions and 4 deletions

View File

@ -99,11 +99,12 @@ $motd = $motdfetcher->getMOTD();
<div class="gridl"> <div class="gridl">
<?php <?php
$title = $motd["title"]; $title = $motd["title"];
$title_text = " - " . $title;
echo "<h2>Dagens melding"; echo "<h2>";
if($title != ""){ if($title == ""){
echo $title_text; echo "Dagens melding";
}else{
echo $title;
} }
echo "</h2>"; echo "</h2>";