print--node--materiau.tpl.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to display a printer-friendly version page.
  5. *
  6. * This file is akin to Drupal's page.tpl.php template. The contents being
  7. * displayed are all included in the $content variable, while the rest of the
  8. * template focuses on positioning and theming the other page elements.
  9. *
  10. * All the variables available in the page.tpl.php template should also be
  11. * available in this template. In addition to those, the following variables
  12. * defined by the print module(s) are available:
  13. *
  14. * Arguments to the theme call:
  15. * - $node: The node object. For node content, this is a normal node object.
  16. * For system-generated pages, this contains usually only the title, path
  17. * and content elements.
  18. * - $format: The output format being used ('html' for the Web version, 'mail'
  19. * for the send by email, 'pdf' for the PDF version, etc.).
  20. * - $expand_css: TRUE if the CSS used in the file should be provided as text
  21. * instead of a list of @include directives.
  22. * - $message: The message included in the send by email version with the
  23. * text provided by the sender of the email.
  24. *
  25. * Variables created in the preprocess stage:
  26. * - $print_logo: the image tag with the configured logo image.
  27. * - $content: the rendered HTML of the node content.
  28. * - $scripts: the HTML used to include the JavaScript files in the page head.
  29. * - $footer_scripts: the HTML to include the JavaScript files in the page
  30. * footer.
  31. * - $sourceurl_enabled: TRUE if the source URL infromation should be
  32. * displayed.
  33. * - $url: absolute URL of the original source page.
  34. * - $source_url: absolute URL of the original source page, either as an alias
  35. * or as a system path, as configured by the user.
  36. * - $cid: comment ID of the node being displayed.
  37. * - $print_title: the title of the page.
  38. * - $head: HTML contents of the head tag, provided by drupal_get_html_head().
  39. * - $robots_meta: meta tag with the configured robots directives.
  40. * - $css: the syle tags contaning the list of include directives or the full
  41. * text of the files for inline CSS use.
  42. * - $sendtoprinter: depending on configuration, this is the script tag
  43. * including the JavaScript to send the page to the printer and to close the
  44. * window afterwards.
  45. *
  46. * print[--format][--node--content-type[--nodeid]].tpl.php
  47. *
  48. * The following suggestions can be used:
  49. * 1. print--format--node--content-type--nodeid.tpl.php
  50. * 2. print--format--node--content-type.tpl.php
  51. * 3. print--format.tpl.php
  52. * 4. print--node--content-type--nodeid.tpl.php
  53. * 5. print--node--content-type.tpl.php
  54. * 6. print.tpl.php
  55. *
  56. * Where format is the ouput format being used, content-type is the node's
  57. * content type and nodeid is the node's identifier (nid).
  58. *
  59. * @see print_preprocess_print()
  60. * @see theme_print_published
  61. * @see theme_print_breadcrumb
  62. * @see theme_print_footer
  63. * @see theme_print_sourceurl
  64. * @see theme_print_url_list
  65. * @see page.tpl.php
  66. * @ingroup print
  67. */
  68. ?>
  69. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
  70. "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
  71. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>">
  72. <head>
  73. <?php print $head; ?>
  74. <base href='<?php print $url ?>' />
  75. <title><?php print $print_title; ?></title>
  76. <?php print $scripts; ?>
  77. <?php if (isset($sendtoprinter)) print $sendtoprinter; ?>
  78. <?php print $robots_meta; ?>
  79. <?php if (theme_get_setting('toggle_favicon')): ?>
  80. <link rel='shortcut icon' href='<?php print theme_get_setting('favicon') ?>' type='image/x-icon' />
  81. <?php endif; ?>
  82. <?php print $css; ?>
  83. </head>
  84. <body>
  85. <?php if (!empty($message)): ?>
  86. <div class="print-message"><?php print $message; ?></div><p />
  87. <?php endif; ?>
  88. <?php if ($print_logo): ?>
  89. <div class="print-logo"><?php print $print_logo; ?></div>
  90. <?php endif; ?>
  91. <div class="print-site_name"><?php print theme('print_published'); ?></div>
  92. <p />
  93. <div class="print-breadcrumb"><?php print theme('print_breadcrumb', array('node' => $node)); ?></div>
  94. <hr class="print-hr" />
  95. <?php if (!isset($node->type)): ?>
  96. <h2 class="print-title"><?php print $print_title; ?></h2>
  97. <?php endif; ?>
  98. <div class="print-content"><?php print $content; ?></div>
  99. <div class="print-footer"><?php print theme('print_footer'); ?></div>
  100. <hr class="print-hr" />
  101. <?php if ($sourceurl_enabled): ?>
  102. <div class="print-source_url">
  103. <?php print theme('print_sourceurl', array('url' => $source_url, 'node' => $node, 'cid' => $cid)); ?>
  104. </div>
  105. <?php endif; ?>
  106. <div class="print-links"><?php print theme('print_url_list'); ?></div>
  107. <?php print $footer_scripts; ?>
  108. </body>
  109. </html>