Changeset 252 in t29-www for lib/technikum29.php
- Timestamp:
- Apr 22, 2012, 5:48:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/technikum29.php
r251 r252 35 35 t29dom_add_class($current_li[0], "current"); 36 36 $ancestors = $current_li[0]->xpath("ancestor-or-self::li"); 37 array_walk($ancestors, function($i){ 38 t29dom_add_class($i, "active"); 39 }); 37 array_walk($ancestors, create_function('$i', 't29dom_add_class($i, "active");')); 40 38 } 41 39 … … 51 49 print $xml->ul->asXML(); 52 50 } 51 52 function print_relations() { 53 global $lib, $seiten_id; 54 55 $sidebar = simplexml_load_file("$lib/../de-v6/sidebar.xml"); 56 $current_a = $sidebar->xpath("//a[@seiten_id='$seiten_id']"); 57 if(count($current_a)) { 58 $prev = $current_a[0]->xpath("preceding::a[@seiten_id][1]"); 59 if(count($prev)) { 60 $a = $prev[0]; 61 print "<li class='prev'><a href='$a[href]'>vorherige Seite <strong>$a</strong></a></li>"; 62 } 63 $next = $current_a[0]->xpath("following::a[@seiten_id][1]"); 64 if(count($next)) { 65 $a = $next[0]; 66 print "<li class='next'><a href='$a[href]'>nächste Seite <strong>$a</strong></a></li>"; 67 } 68 } else { 69 print '<li class="start"><a href="#">Starte Führung <strong>Blabla</strong></a>'; 70 } 71 }
Note: See TracChangeset
for help on using the changeset viewer.