From 5fa33b296281b9f0ff7ed269e2ba50acd5e6f669 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 12 Jan 2004 22:53:43 +0000 Subject: - Made l() add 'class="active"' to the active/current URL. --- includes/common.inc | 2 +- includes/menu.inc | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/includes/common.inc b/includes/common.inc index 39597b8aa..55f3e6520 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -985,7 +985,7 @@ function drupal_attributes($attributes = NULL) { } function l($text, $url, $attributes = array(), $query = NULL, $fragment = NULL) { - return "$text"; + return "$text"; } function field_get($string, $name) { diff --git a/includes/menu.inc b/includes/menu.inc index 7001e1d9b..dc37df005 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -259,11 +259,7 @@ function _menu_sort($a, $b) { function _render_item($path) { global $_list; - if ($path == $_GET["q"]) { - $css = " class=\"active\""; - } - - return "". $_list[$path]["title"] .""; + return l($_list[$path]["title"], $path); } -- cgit v1.2.3