Impasse: Links to <front> are not marked active
Links created with l() to the special path '<front>' are not marked with the CSS class "active" as they should be. The issue http://drupal.org/node/78487 discusses the problem and has a working patch. Unfortunatey, we have an impasse on the fix. Let's not ship D6 with this ridiculous little bug still alive. The patch is not committed because drumm said (#10): "Any code which passes '<front>' to l() is buggy. We should be fixing the root problems, not symptoms." I replied (#11): "function url() is also written to assume that <front> may be passed. From common.inc:1.611 line 1183: // The special path '<front>' links to the default front page. if (!empty($path) && $path != '<front>') { In my case, I've added <front> to the primary links menu. I could submit a patch to menu_item_link() to replace <front> with '' before passing it to l(), but I'd suggest that would constitute fixing a symptom, not the root problem. We'd basically have to fix every invocation of l() because the API has specified for a while that you can pass <front> and it will work so we don't necessarily know everywhere it might occur." So, if fixing l() as in the patch is wrong, can someone suggest the correct fix? Thanks, Barry
participants (1)
-
Barry Jaspan