Mastering Drupal 8 Views
eBook - ePub

Mastering Drupal 8 Views

Gregg Marshall

  1. 272 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Mastering Drupal 8 Views

Gregg Marshall

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Mastering Drupal 8 Views un PDF/ePUB en línea?
Sí, puedes acceder a Mastering Drupal 8 Views de Gregg Marshall en formato PDF o ePUB, así como a otros libros populares de Computer Science y Content Management Systems. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
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...

Índice

  1. Mastering Drupal 8 Views
Estilos de citas para 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.