summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-12-11 20:21:44 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-12-11 20:24:15 +0100
commitf7dbf1759d3f9a578d8d84bda58bda7777ee7365 (patch)
treeb7b5be60cf6abf5e024159ec1e321f1d2d8fec7b
parent1517cb8444c231a57edfee2a6a1dfff4f05de493 (diff)
downloadrpg-f7dbf1759d3f9a578d8d84bda58bda7777ee7365.tar.gz
rpg-f7dbf1759d3f9a578d8d84bda58bda7777ee7365.tar.bz2
scroll to current page when opening the sitemap
-rw-r--r--inc/html.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/html.php b/inc/html.php
index 711cd8db6..cdcd166d9 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -937,8 +937,14 @@ function html_list_index($item){
* @return string html
*/
function html_li_index($item){
+ global $INFO;
+
if($item['type'] == "f"){
- return '<li class="level'.$item['level'].'">';
+ // scroll to the current item
+ if($item['id'] == $INFO['id']) {
+ $id = ' id="scroll__here"';
+ }
+ return '<li class="level'.$item['level'].'" '.$id.'>';
}elseif($item['open']){
return '<li class="open">';
}else{