Book Image

Drupal 7 Views Cookbook

By : J. Ayen Green
Book Image

Drupal 7 Views Cookbook

By: J. Ayen Green

Overview of this book

<p>Fully revised and updated for 2016, Drupal 7 Views Cookbook allows you to bypass most of the Views' learning curve and quickly take advantage of the capabilities of the Views module to select and present your Drupal content through step-by-step instructions for quickly developing dozens of useful views.</p> <p>Starting with a brief introduction to Views, Drupal 7 Views Cookbook takes you through recipes for elementary views, such as displaying randomly selected content, to intermediate views, such as customizing links, to advanced views providing multiple interacting displaysof content on the same page<a name="_GoBack"></a>. Along the way, there are recipes for theming views, creating a view in your code, creating a custom view handler, administering views, and finally, using some other modules related to the Views module. Most recipes are standalone, so pick them in any order!</p> <p>Don't limit your site with dull presentation of content in last-in-first-out order. Empower your site visitors with the recipes that Drupal 7 Views Cookbook delivers!</p>
Table of Contents (17 chapters)
Drupal 7 Views Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Bundle: Product


This is used in the following recipes:

  • Sortable table with a header and footer of Chapter 3, Intermediate Custom Views

  • Creating a random ad block of Chapter 2, Basic Custom Views

  • A marketing bundle of Chapter 4, Creating Advanced Views

Details

Name

Comments

Author information

Product

None

None

Field

Type

Format

Product image (field_product_image)

Image

Image exhibit

Field

Type

Product price (field_product_price)

Decimal

Creating bundle: Product...

  1. Navigate to admin/structure/types and click +Add content type.

  2. Enter Product into the Name textbox.

  3. Enter Products for sale in the Description textbox.

  4. Click the Display settings vertical tab.

  5. Uncheck the Display author and date information checkbox.

  6. Click the Comment settings vertical tab.

  7. Select Hidden from the Default comment setting for new content select box.

  8. Click the Save and add fields button.

  9. Under Add new field, enter Product image into the Label textbox.

  10. Select Image from the Type of data to store select box.

  11. Click the Save button.

  12. Click the Save field settings button.

  13. Click the Save settings button.

  14. Under Add new field, enter Product price into the Label textbox.

  15. Select Decimal from the Type of data to store select box.

  16. Click the Save button.

  17. Click the Save field settings button.

  18. Enter $ in the Prefix textbox, or another currency identifier in the Prefix or Suffix textboxes.

  19. Click the Save settings button.

  20. Click the Manage display tab.

  21. Select <hidden> from the LABEL (column) select box for the Product image field (row).

  22. Click the settings gear icon in the same row.

  23. Select Medium (220x220) from the Image style (column) select box.

  24. Select <Hidden> from the LABEL (column) select box for the Product price field (row).

  25. Select Default from the FORMAT (column) select box for Product price (row).

  26. Click the CUSTOM DISPLAY SETTINGS link.

  27. Check the Full content checkbox.

  28. Click the Teaser tab at the top of the window.

  29. Select <Hidden> from the LABEL (column) select box for the Product image field (row).

  30. Select Image from the FORMAT (column) select box for the same row.

  31. Click the settings gear icon in the same row.

  32. Select Medium (220x220) from the Image style (column) select box.

  33. Select <hidden> from the LABEL (column) select box for the Product price field (row).

  34. Select Default from the FORMAT (column) select box for Product price (row).

  35. Rearrange the fields by dragging so that the order is Product image, Product price, and Body.

  36. Click the Save button.