mirror of
https://github.com/php/web-php.git
synced 2026-04-28 09:23:14 +02:00
the active classname should be on the list item
This commit is contained in:
+1
-1
@@ -561,7 +561,7 @@ function news_archive_sidebar()
|
||||
for ($i = 1998; $i < 2007; $i++) {
|
||||
$pagename = "archive/$i.php";
|
||||
$classname = ($pagename == $_SERVER['BASE_PAGE'] ? ' class="active"' : '');
|
||||
$SIDEBAR_DATA .= '<li><a href="/' . $pagename .'"' . $classname .'>' . $i . "</a></li>\n";
|
||||
$SIDEBAR_DATA .= "<li{$classname}><a href=\"{$pagename}\">{$i}</a></li>\n";
|
||||
}
|
||||
$SIDEBAR_DATA .= '</ul>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user