changeset 97:ba11b1c1b881

Add baseUrl to activeNav filter.
author Tom Fredrik "BFG" Klaussen <bfg@blenning.no>
date Thu, 18 Oct 2012 22:39:21 +0200
parents c7de7a4641d7
children f2d52fed708c
files filters.inc
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/filters.inc	Thu Oct 18 21:48:58 2012 +0200
+++ b/filters.inc	Thu Oct 18 22:39:21 2012 +0200
@@ -26,10 +26,12 @@
 
   $opt = repMapString($options->getUrlParams());
 
+  $baseUrl = $options->getBaseUrl();
+
   $output = preg_replace_callback($pattern,
 	create_function(
 	  '$matches',
-	  'return "<li id=\"$matches[1]\" $matches[2]><a href=\"" . genUrl(' . $opt . ', array("name" => $matches[1]), array("lang") ) . "\">$matches[3]</a></li>";'
+	  'return "<li id=\"$matches[1]\" $matches[2]><a href=\"' . $baseUrl . '" . genUrl(' . $opt . ', array("name" => $matches[1]), array("lang", "name") ) . "\">$matches[3]</a></li>";'
 	),
 	$output);