<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
It was. People just don't tend to reply to much on Saturdays.<br>
<br>
Brian<br>
<br>
Cédric Joubert wrote:
<blockquote
cite="mid:f5338d441003070035s470f402ayd5c013cc24089696@mail.gmail.com"
type="cite">Hi,<br>
<br>
Because i'm new on the liste, i'm wondering if my previous message
correctly received on the list ?<br>
<br>
Cédric<br>
<br>
<div class="gmail_quote">---------- Forwarded message ----------<br>
From: <b class="gmail_sendername">Cédric Joubert</b> <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:cedjoubert@gmail.com">cedjoubert@gmail.com</a>></span><br>
Date: 2010/3/6<br>
Subject: How to add comment under menu items<br>
To: <a moz-do-not-send="true" href="mailto:development@drupal.org">development@drupal.org</a><br>
<br>
<br>
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi,</font></div>
<div> </div>
<div><font face="Arial" size="2">I'm new on Drupal and I would like
to know how can I make properly such comment on items Menu please ?</font></div>
<div><font face="Arial" size="2"> -> each first row is a link and
each 2nd row is a comment...</font></div>
<div> </div>
<div><font face="Arial" size="2">- Menu 1</font></div>
<div><font face="Arial" size="2"> (my explanation)</font></div>
<div>
<div> </div>
<div><font face="Arial" size="2">- Menu 2</font></div>
<div><font face="Arial" size="2"> (other explanation ...)</font></div>
<div><font face="Arial" size="2">...</font></div>
<div> </div>
<div><font face="Arial" size="2">The only solution i've found is to
do that (below)... but i'm sure it's not a property way...</font></div>
<div><font face="Arial" size="2">- the only constraint i have is to
have the abbility to get the Description field in the underlying menu
to display a dynamic comment.</font></div>
<div><font face="Arial"><font size="2">but actually, the only trick
I've found to get the Description is to parse the HTML string to
retrieve the "<span>title" tag to get my text.</span></font></font></div>
<div><font face="Arial"><font size="2"><span>Not very cool, i think...</span></font></font></div>
<div><font face="Arial"><font size="2"><span>- actually, to determine
the underlying nodes menu, i'm testing her names... is there another
way to do that ?</span></font></font></div>
<div> </div>
<div><font face="Arial" size="2">Can you help me please ?</font></div>
<div> </div>
<div><font face="Arial" size="2">Regards</font></div>
<div><font face="Arial" size="2">Cédric</font></div>
<div> </div>
<div> </div>
<div><font face="Arial" size="2">function myTheme_menu_item(</font><font
face="Arial" size="2">$link, $has_children, $menu = '',
$in_active_trail = FALSE, $extra_class = NULL) {<br>
$class = ($menu ? 'expanded' : ($has_children ? 'collapsed' :
'leaf'));<br>
if (!empty($extra_class)) {<br>
$class .= ' '. $extra_class;<br>
}<br>
if ($in_active_trail) {<br>
$class .= ' active-trail';<br>
}<br>
$css_id = strip_tags($link);<br>
</font></div>
<div><font face="Arial" size="2"> // test the node for which i want
to add comment<br>
if (stripos($link, 'MyMenu1') > 0 || stripos($link, 'MyMenu2')
> 0) {<br>
$rec = 'title="';<br>
$i = stripos($link, $rec);<br>
if ($i > 0) {<br>
$j = strpos($link, '"', $i+strlen($rec));<br>
if ($j > 0)<br>
$title = substr($link, $i+strlen($rec), $j-$i-strlen($rec));<br>
} <br>
}<br>
<br>
$title = ($title != "") ? '<div
class="views-field-created"><h0>&nbsp;&nbsp;&nbsp;&nbsp;['
. $title . ']</h0></div>' : '';<br>
return '<li class="'. $class .'">'. $link . $menu
."</li>\n" . $title;<br>
}<br>
</font></div>
</div>
</div>
</div>
<br>
</blockquote>
<br>
</body>
</html>