function drupal_add_html_head_link

cis7 drupal_add_html_head_link($attributes, $header = FALSE)
cle7 drupal_add_html_head_link($attributes, $header = FALSE)
elmsmedia7 drupal_add_html_head_link($attributes, $header = FALSE)
icor7 drupal_add_html_head_link($attributes, $header = FALSE)
meedjum_blog7 drupal_add_html_head_link($attributes, $header = FALSE)
mooc7 drupal_add_html_head_link($attributes, $header = FALSE)

Adds a LINK tag with a distinct 'rel' attribute to the page's HEAD.

This function can be called as long the HTML header hasn't been sent, which on normal pages is up through the preprocess step of theme('html'). Adding a link will overwrite a prior link with the exact same 'rel' and 'href' attributes.


$attributes: Associative array of element attributes including 'href' and 'rel'.

$header: Optional flag to determine if a HTTP 'Link:' header should be sent.

13 calls to drupal_add_html_head_link()
drupal_add_feed in includes/
Adds a feed URL for the current page.
ds_extras_node_page_view in sites/all/modules/ulmus/ds/modules/ds_extras/includes/
Menu callback: show an individual node with the Switch field.
file_entity_view_page in sites/all/modules/ulmus/file_entity/
Menu callback; view a single file entity.
node_page_view in modules/node/node.module
Menu callback: Displays a single node.
openid_test_html_openid1 in modules/openid/tests/openid_test.module
Menu callback; regular HTML page with OpenID 1.0 <link> element.

... See full list


includes/, line 2834
Common functions that many Drupal modules will need to reference.


function drupal_add_html_head_link($attributes, $header = FALSE) {
  $element = array(
    '#tag' => 'link',
    '#attributes' => $attributes,
  $href = $attributes['href'];

  if ($header) {
    // Also add a HTTP header "Link:".
    $href = '<' . check_plain($attributes['href']) . '>;';
    $element['#attached']['drupal_add_http_header'][] = array('Link', $href . drupal_http_header_attributes($attributes), TRUE);

  drupal_add_html_head($element, 'drupal_add_html_head_link:' . $attributes['rel'] . ':' . $href);



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.