I've modified the simplified login block to:

global $user;
if ($user->uid) {
} else {
  $text = "Log In";
  $path = "user";
}
print l("RSS feed", "rss/Slide_Collection", array());
echo "<br/>";
print l("Contact Us \n", "contact", array());
echo "<br/>";
print l($text, $path, array(), drupal_get_destination());

And now I would like to add the "a title" or alt bit, so that I can create a description for each link, that can be seen using jtooltips.

Thanks

Comments

pbarnett’s picture

Hi.

The array() should be an associative array with key/value pairs like "alt" => "descriptive text" like this

print l("RSS feed", "rss/Slide_Collection", array("alt" => "Slide Collection"));

Not tested, but that's what the API docs said.

Pete.

Ev0’s picture

thanks, I tried "title" => "", and it worked!

jmav’s picture

If you are using l function be aware of javascript file sweetTitles.js from module http://drupal.org/project/jtooltips

FIX:
http://drupal.org/node/168871