You are here

README.txt in Simple Background image formatter 8

Same filename and directory in other branches
  1. 7 README.txt
Background Image Formatter
================


Introduction
------------


This module provides an image formatter that allows you to display the image
in a div as background image.
The module extends Drupal's images field. Because settings are attached
to the entity, it's very easy to setup and manage.



Features
--------

1. No module dependencies (Other that image).

2. Works with Drupal's field UI.

3. Works with Views.

4. Integrates with Drupal's image styles.

5. Offers 2 modes. (Inline Style & CSS Selector)



Inline Style
------------

Instead the generating the normal img markup we now generate
the div with a inline style.

This

<img src="PATH" />

is changed to

<div class="[YOUR CLASS]" style="background-image:
url('[ABSOLUTE PATH]')">&nbps;</div>



CSS Selector
------------

This option prevents the img tag from being printed to the dom and instead
generates a stylesheet in the dom.

The expected out with be something like this.

<style>
[YOUR SELECTOR] {background-image: url('[ABSOLUTE PATH]');}
</style>



Basic Installation
------------------

1. Download and enable the module.

2. Go to Administration >  Structure > Content Types (admin/structure/types).

3. Click on Manage Display for the relevant content type.
(admin/structure/types/manage/page/display)

4. Change the Format to Background Image for the relevant image field.

5. Click on the settings gear to define your settings.

File

README.txt
View source
  1. Background Image Formatter
  2. ================
  3. Introduction
  4. ------------
  5. This module provides an image formatter that allows you to display the image
  6. in a div as background image.
  7. The module extends Drupal's images field. Because settings are attached
  8. to the entity, it's very easy to setup and manage.
  9. Features
  10. --------
  11. 1. No module dependencies (Other that image).
  12. 2. Works with Drupal's field UI.
  13. 3. Works with Views.
  14. 4. Integrates with Drupal's image styles.
  15. 5. Offers 2 modes. (Inline Style & CSS Selector)
  16. Inline Style
  17. ------------
  18. Instead the generating the normal img markup we now generate
  19. the div with a inline style.
  20. This
  21. is changed to
  22. &nbps;
  23. CSS Selector
  24. ------------
  25. This option prevents the img tag from being printed to the dom and instead
  26. generates a stylesheet in the dom.
  27. The expected out with be something like this.
  28. Basic Installation
  29. ------------------
  30. 1. Download and enable the module.
  31. 2. Go to Administration > Structure > Content Types (admin/structure/types).
  32. 3. Click on Manage Display for the relevant content type.
  33. (admin/structure/types/manage/page/display)
  34. 4. Change the Format to Background Image for the relevant image field.
  35. 5. Click on the settings gear to define your settings.