Book Image

Drupal 6 Attachment Views

By : J. Ayen Green
Book Image

Drupal 6 Attachment Views

By: J. Ayen Green

Overview of this book

<p>The Drupal View modules give you the flexibility and freedom to customize the display of your web site's content. Defining custom content types is easy; however, it's also possible to use various content types in a complementary manner on the same page! Attachment displays in Views (also known as Attachment Views), are a way to customize your web site with multiple displays that interact with each other and turn a nice site into a spectacular one.<br /><br />This hands-on tutorial will teach Drupal developers across the experience spectrum how to use Attachment displays in Views, to make quick progress in functionality and added-value to users! Views are a common way to display a collection of similar content types on one page. What do you do if you want to display different content types simultaneously? What if you want to allow a user to interactively select which content they want, without using a menu? You can actually have more than one display within a view and views within a view.<br /><br />This book starts by introducing Attachment Views as reader activities. Here, we create a single Attachment View and take a closer look at giving each page an interactive feel. It also shows you to create a View with an Attachment View. Later, using practical examples, it helps you to develop a 3-view composite display using two and three custom content types. You will also be able to develop a composite display using multiple Attachment Views, to provide a control panel of sorts from which you can view the various content types. Finally, we will put the home page together making use of Views, blocks, a flash slide show, and other pieces.<br /><br />This book provides several examples of introducing additional displays onto a web page, and having them interact with each other. The result is pages that provide several types of information and behave more like a desktop application, increasing the value to your site visitors.</p>
Table of Contents (17 chapters)
Drupal 6 Attachment Views
Credits
About the Author
About the Reviewers
Preface

Content types in the Guild Builders site


Let's take a look at the content types that were created for use in our site, and the fields in each.

About-Us Info

The About-Us Info content type is used on the About-Us page, because a view is used to present that page, and filtering a view by content type is simple. Another option would have been to set the View filter to a specific node, but this way, the node can be unpublished and another easily put in its place.

Name: About-Us Info

Type: about_us

Description: The node that will be used on the About Us page to describe the company

Submission settings: Unchanged

Workflow settings: Published

CCK Fields: None

Bio

The Bio content type is used to create employee biographies.

Name: Bio

Type: bio

Description: Employee biography

Submission settings:

Title field label: Name

Body field label: Bio

Workflow settings: Published

CCK Fields: Job Title (field_job_title) Text field

Settings: Default

Photo (field_bio_photo) File field (image)

Settings: Default

Job

The Job content type is dual-use. Prior to a job beginning, it is used to supply pre-bid information to the subcontractors. Following the job's completion, it is used to provide prior work information to any potential clients.

Name: Job

Type: job

Description:Description of a current (for bidding) or past (for displaying information) job

Submission settings:

Title field label: Project name

Project description: Project description

Workflow settings: Published

CCK Fields: Project address (field_project_address) Text area

Settings: Rows: 5

Bid phase (group_bid) Standard group

Union (field_union) Check boxes / radio buttons

Settings: Values: Union, Non-union, N/A

Bidding Open (field_bidding_open) Single on/off checkbox

Settings: Values: false, Open for bidding

Bid due (field_bid_due) Text field with date popup

Settings: Default: now

Site visit (field_site_visit) Text field with date popup

Settings: default

Special instructions (field_special_instructions) Text area

Settings: Rows: 5

Post completion group_completed Standard group

Display completed job (field_display_job) Single on/off checkbox

Settings: Values: false, Display completed job

Job photo (field_job_photo) File field (image)

Settings: Default

Project manager (field_project_manager)

Node reference (check box)

Settings: Content types- Bio

Location

The location content type is used to hold a Google map identifying the location of the office.

Name: Location

Type: location

Submission settings: Default

Workflow settings: Published

CCK Fields: Map (field_map) Embedded Google Map

Settings: Default

Subcontractor

The subcontractor content type is used to hold profile details about a subcontractor.

Name: Subcontractors

Type: subcontractors

Description: Subcontractor details

Submission settings:

Title field label: Name

Body field label: Bio

Workflow settings: Published

CCK Fields: Contact name (field_contact) Text

Settings: Required

Address (field_address) Text area

Settings: Rows: 5

Phone (field_ phone) Text

Settings: Size: 20, Required

Fax (field_fax) Text

Settings: Size: 20, Required

Cellular (field_cellular) Text

Settings: Size: 20

Web site (field_web_site) Text

Settings: Default

Union (field_union) check boxes / radio buttons

Settings: Required, Values: Union, Non-union, N/A

Bondable (field_bondable) check boxes / radio buttons

Settings: Required, Values: Yes, No

Specialties (field_specialties)

check boxes / radio buttons

Settings: Multiple selections allowed

Values: Dumpster Supplier, Rental Equipment (tools, machinery, fencing, trailers etc), Cleaning, Surveyor, Sign Company, Architect Engineer, Civil Engineer, Testing, Demolition Contractor, Concrete Cutting, Coring, Surfacing, Removal, Hazardous Waste Removal, Site Demolition, Tree Clearing and Grubbing, Erosion Control, Earth Work, Paving, Sealing Striping, Storm Piping, Water and Sewer Piping, Septic Construction, Landscaping and Irrigation Fencing, Concrete Curbs, Concrete Footers, Slabs, Sidewalks, Concrete Structural, Concrete Material Supplier, Masonry Block, Brick, Stucco, Dryvit, Decorative and Applied Stone, Marble, Granite, Masonry Material Supplier, Structural Steel Supplier, Miscellaneous Steel Supplier, Steel Erector, Railing Fabrication, Welder, Wood Framer, Light Gauge Steel Framer, Timber Framer, Finish Carpentry, Interior Trim Carpentry, Exterior Trim Carpentry, Carpentry Material Supplier, Millwork Supplier, Millwork Installer, Drywall Install and Finish, Drywall Material Supplier, Insulation Supply and Installation, Fireproofing, Roofing Shingle, Roofing Membrane and Built up, Roofing Metal, Siding, Soffit and Facia, Gutters and Downspouts, Caulking, Architectural Door and Hardware Supplier, Door Installation, Storefront Aluminum, Glass Supply and Installation, Overhead Door Supplier and Installation, Window and Skylight Supplier, Ceramic Tile Supplier, Ceramic Tile Installation, Marble and Stone Flooring, Terrazzo Flooring, Suspended Ceiling Supplier, Suspended Ceiling Installer, Flooring Installer, Flooring Supplier, Specialty Flooring (poured, heat welded, epoxy), Painting, Wallpaper Supplier, Wallpaper Installation, Specialty Wall Coverings, Bathroom Accessory Supply and Installation, Window Blind Supply and Installation, Fire Control Specialties, Miscellaneous Specialties, Loading Sock Equipment Supplier and Installation, Kitchen Equipment Supplier and Installation, Appliance Supplier, Athletic Equipment Supplier and Installation, Furniture Supplier, Laboratory Equipment Supplier, Elevator / Lift Supply and Installation, Escalator Supply and Installation, Plumbing, Gas Piping, Medical Gas Piping, Sprinklers, HVAC, HVAC Equipment Supplier, Refrigeration, Kitchen and Hood Installation, Electrical, Alarm and Security