Drupal - 对 mailto 链接使用 l 或 url 函数

标签 drupal drupal-6 hyperlink

有谁知道如何使用 l() 或 url() 函数来创建 mailto 链接?

我正在运行drupal 6。

最佳答案

您需要使用绝对选项:

l('Mail me', 'mailto:jim@hotmail.com', array('absolute' => TRUE));

会产生
<a href="mailto:jim@hotmail.com">Mail Me</a>

关于Drupal - 对 mailto 链接使用 l 或 url 函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1460100/

相关文章:

drupal - 向 Drupal 添加另一个节点显示(如预告片、完整节点)

css - 是否可以在 drupal 6 标题 block 中使用内联 css 来获取重复的背景图像?

php - 如何在 PHP 中创建下载链接?

drupal - 如何在 View 批量操作期间显示附加表单?

drupal - 获取 Drupal 8 View - View -字段中链接字段的 URL

php - Drupal 6 表单通过数据库查询进行迭代

c++ - C++如何链接模板实例

c# - 一种链接到类,方法,特别是C#注释中特定代码行的方法

php - 这些使用 db_or() 的 Drupal SQL 查询有什么问题?

css - 添加到页面的 Drupal 7 额外类