image-insert-image.tpl.php 1.2 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * @file
  4. * Template file for Image module content inserted via the Insert module.
  5. *
  6. * Available variables:
  7. * - $item: The complete item being inserted.
  8. * - $url: The URL to the image.
  9. * - $class: A set of classes assigned to this image (if any).
  10. * - $width: The width of the image (if known).
  11. * - $height: The height of the image (if known).
  12. * - $style_name: The Image style being used.
  13. *
  14. * Note that ALT and Title fields should not be filled in here, instead they
  15. * should use placeholders that will be updated through JavaScript when the
  16. * image is inserted.
  17. *
  18. * Available placeholders:
  19. * - __alt__: The ALT text, intended for use in the <img> tag.
  20. * - __title__: The Title text, intended for use in the <img> tag.
  21. * - __description__: A description of the image, sometimes used as a caption.
  22. * - __filename__: The file name.
  23. * - __[token]_or_filename__: Any of the above tokens if available, otherwise
  24. * use the file's name. i.e. __title_or_filename__.
  25. */
  26. ?>
  27. <img src="<?php print $url ?>" <?php if ($width && $height): ?>width="<?php print $width; ?>" height="<?php print $height; ?>" <?php endif; ?>alt="__alt__" title="__title__" class="image-<?php print $style_name ?><?php print $class ? ' ' . $class : '' ?>" />