Mastering Drupal 8 Views
eBook - ePub

Mastering Drupal 8 Views

Gregg Marshall

  1. 272 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Mastering Drupal 8 Views

Gregg Marshall

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Accelerate your development process using Drupal 8 Views with this advanced, practical guide

About This Book

  • A practical, step-by-step guide with illustrative examples to give you a clear understanding of Drupal 8 views
  • Get the only book on the market that talks about Drupal 8 views and their importance for developers
  • Get an understanding of how views work and how they help to create modular applications

Who This Book Is For

This book is for web developers, web designers, and website administrators who use Drupal 8, have some basic knowledge of managing and developing apps with Drupal, and who want to get an advanced, practical knowledge of views and how to leverage them in Drupal 8 applications.

What You Will Learn

  • Create displays of content that are automatically updated when you add new content
  • Show maps and rotating image carousels on your site
  • Combine content to create composite displays using the same data in different ways
  • Use fields from more than one content type to create powerful views of multi-table data
  • Modify the field data being displayed, combining it in different ways or changing the HTML that might be normally generated
  • Add headers and footers above and below a views display
  • Make the output of your view look exactly like the designer specifies
  • Change the order in which a list of content is displayed, limit the content shown to only certain content types or values
  • Filter content using values passed to the view in the URL, making a single view work different ways

In Detail

Learn how to build complex displays of content—all without programming.

Views were used on more than 80% of all Drupal 7 sites; now they are part of the Drupal 8 core. While most site builders and site owners are aware of views, they don't understand how to take full advantage of their power to create many amazing pages and blocks. If they use views, they might build 10 different view displays with different filters, without knowing that a contextual filter would require only a single display.

Using our sample company, we'll take its existing content and evolve an ever more complex and powerful website for that company, starting with adapting the administration the user sees and moving on to making complex pages of information for site visitors.

While the book is written for Drupal 8, the similarities between Views in Drupal 7 and 8 make this a useful reference for Drupal 7 site builders also.

Style and approach

This is the only advanced resource that will show you how to create, customize, and manage views in the Drupal 8 development environment. This has become more important since Drupal 8 has made views part of its core architecture.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Mastering Drupal 8 Views est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Mastering Drupal 8 Views par Gregg Marshall en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Content Management Systems. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2016
ISBN
9781785886966

Mastering Drupal 8 Views


Table of Contents

Mastering Drupal 8 Views
Credits
Foreword
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
A short history
Drupal is always changing
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the color images of this book
Errata
Piracy
Questions
1. Up and Running with Views
Drupal 8 is here, should I upgrade?
Looking at the Views administration page
Views settings
Views advanced settings
Views basic settings
Live Preview Settings
Adapting an existing View
Editing the Property Maintenance view
Debugging – Live Preview is your friend
Summary
2. Views from Scratch
A first try at listing the available properties
Adding a new view
New page settings
Adding fields
The anatomy of a view
View Types
Content
Content revisions
Comments
Log entries
Files
Taxonomy terms
Users
Custom blocks
Custom block revisions
Other View Types
Displays
Master
Page
Block
Attachment
Embed
Entity reference
Feed
REST export
Display Formats
The unformatted list
The HTML list
Grid
Table
Display Contents
Fields
Content/entity
Search results
Showing the Watchdog logs
Adding the Views
The view edit page
Summary
3. Sorting and Filtering
Changing the sort order
Deleting a sort criteria
Adding a sort criteria
Multilevel sorts
Grouping
Exposed sort fields
Filtering results
The "To Be Published" View for administrators
Filtering by node status
Filtering by content type – compound filters
Filtering by field value
Exposed filters – giving power to your visitors
Exposed filter options
Summary
4. Contextual Filters
Contextual filters are filters in a different place
Adding an image map linked to neighborhood listings
Adding a contextual filter
Finishing the image map
Using default values to "create" options
Adding a block view for unpublished properties
Default filter value options
Finishing up the view and testing
Contextual filter options explained
Options for no value
Default value options
Default value exception options
Value present options
Validation options
Non-permissions-based validation options
Permissions-based validation options
Options inside the More fieldset
Numeric fields
String fields
Glossary mode
URL transformation
Multiple values
Role and taxonomy field options
Null fields
Summary
5. Relationships
Fixing the neighborhood property listing title
Adding a relationship
Relationships often add new fields
What are relationships?
Blue Drop website relationships
Relationship "direction"
Reverse relationships
Automatic reverse relationships
Adding realtor information to the property listings
Adding new fields
Debugging when you forget to specify the relationship
Adding an open house attachment display to the property listings view
Defining what to attach a view to
Adding the relationship
Cleaning up what is displayed
Adding Open House fields to display
Adding exposed filters to the attachment
Other relationship considerations
Picking the right View Type
Lynn's next assignment
Summary
6. Add-on Modules
Adding a rotating carousel to the front page
Install the Views Slideshow Module
Add a new view
Add fields
Adding a filter
Debugging slide rotation
Installing the jquery.cycle library
jquery.cycle options
Mapping content
Creating a view for the map
Adding the geolocation field
Doing away with pagers – creating an infinite page
Creating an infinite scroll property image gallery
Expandable accordions hide and show content
Putting one View inside another
Creating the child view
Creating the parent view
Debugging the configuration
Adding a calendar of open houses
Installing the Calendar and Views Templates modules
Adding a calendar view
Adding a relationship to properties
Final view adjustments
Summary
7. Field Rewrites
Linking to anything
Introducing field rewrites
Linking to content
Excluding from display
Field render as URL options
Changing how fields are output
Open house formatting
Property map enhanced bubble displays
Adding fields to the display
Rewriting several fields into one
Using HTML to format the rewritten field
If-then-else conditional rewrites
No results options
Starting at the end
Going beyond two levels
Other uses for field rewrites
Summary
8. Customizing Views
Display settings
Attachment
Block
Embed
Entity Reference
Feed
Page
REST export
Header, Footer, and No Results Behavior
Pager
Replacing Drupal 7's mini pager
Pager options
Adding No Results and Footer to Available Property Listings
Summary
9. Advanced View Settings
Becoming advanced
Revisiting Header/Footer options
Contextual filters and relationships
Advanced options
Exposed form in block
Using AJAX to update pages
Hiding attachments and enabling contextual links
Changing the SQL queries generated by views
Query settings
Reading from a secondary database server
Developer options
Using aggregation
Aggregation type
Grouping
Making Views go fast
Caching types
Dinner plans
Summary
10. Theming Views
Time to theme
Designing mock-ups for the new site
Changing generated HTML and CSS from the Views UI
Structure of a View's output
The entire View CSS settings
Theme debugging
Row CSS
Field HTML and CSS
When the HTML code needs to change
A quick review of the Drupal 8 theming changes
Drupal 7's PHPTemplate version of views-view.tpl.php
Drupal 8's Twig version of views-view.tpl.php
Twig variables
Enabling theme/Twig debugging
Views templates
Template suggestions
Going live and accolades
Summary
A. Content Types for a Sample Site
Property
Property Owner
Realtor
Open House
County Taxonomy
Neighborhood Taxonomy
Index

Mastering Drupal 8 Views

Copyright © 2016 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author nor Packt Publishing, and its dealers and distributors will be held liable for a...

Table des matiĂšres

  1. Mastering Drupal 8 Views
Normes de citation pour Mastering Drupal 8 Views

APA 6 Citation

Marshall, G. (2016). Mastering Drupal 8 Views (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/4640/mastering-drupal-8-views-pdf (Original work published 2016)

Chicago Citation

Marshall, Gregg. (2016) 2016. Mastering Drupal 8 Views. 1st ed. Packt Publishing. https://www.perlego.com/book/4640/mastering-drupal-8-views-pdf.

Harvard Citation

Marshall, G. (2016) Mastering Drupal 8 Views. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/4640/mastering-drupal-8-views-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Marshall, Gregg. Mastering Drupal 8 Views. 1st ed. Packt Publishing, 2016. Web. 14 Oct. 2022.