You are here

attachment-links.tpl.php in Attachment Links 6

Same filename and directory in other branches
  1. 7 attachment-links.tpl.php

Renders the permalinks to a node's files.

Available variables:

  • $attachment_links_array: Array of keyed attachment link arrays. Each array in this array has the following keys:

    • 'url' - URL for that item's attachment.
    • 'weight' - Relative weight for that attachment within $attachment_links.
    • 'default render' - Default rendering of the item.
  • $attachment_links_title: String containing the title of the attachment links section.
  • $attachment_links: Default unordered list rendering for the attachment links as generated by theme('item_list',...).

The following variables are provided for contextual information.

  • $node: Node object the link information is being rendered for.
  • $user: The user accessing the node.

File

attachment-links.tpl.php
View source
<?php

/**
 * @file
 * Renders the permalinks to a node's files.
 *
 * Available variables:
 * - $attachment_links_array: Array of keyed attachment link arrays. Each
 *   array in this array has the following keys:
 *     - 'url' - URL for that item's attachment.
 *     - 'weight' - Relative weight for that attachment within
 *        $attachment_links.
 *     - 'default render' - Default rendering of the item.
 * - $attachment_links_title: String containing the title of the attachment
 *   links section.
 * - $attachment_links: Default unordered list rendering for the attachment
 *   links as generated by theme('item_list',...).
 *
 * The following variables are provided for contextual information.
 * - $node: Node object the link information is being rendered for.
 * - $user: The user accessing the node.
 *
 * @see template_preprocess_attachment_links()
 * @see theme_item_list()
 */
?>

<div id="attachment-links">
  <?php

if ($attachment_links_title) {
  ?>
    <h3><?php

  print $attachment_links_title;
  ?></h3>
  <?php

}
?>
  <?php

print $attachment_links;
?>
</div>