5

I would like to include a link to the reports page within a dsm message. Here is what I tried:

  $loglink = l("logs", 'admin/reports/dblog');
  $msg= "See $loglink for watchdog messages";
  dsm ($msg);

However, this displays the raw html (a href=...) and does not render the link.

How do I render the html link within a dsm message? (I am using Drupal 6.x)

8

You can't with dsm() I'm afraid, it's run through Krumo which encodes any special chars into HTML entities. Check out the dpm() documentation (which is called internally by dsm()) and follow the function trail through and it'll make more sense.

You'll have to resort to good ol' drupal_set_message():

$loglink = l("logs", 'admin/reports/dblog');
$msg= "See $loglink for watchdog messages";
drupal_set_message($msg);
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.