万本电子书0元读

万本电子书0元读

顶部广告

Drupal 8: Enterprise Web Development电子书

售       价:¥

5人正在读 | 0人评论 9.8

作       者:Nick Abbott

出  版  社:Packt Publishing

出版时间:2016-12-01

字       数:922.2万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Harness the power of Drupal 8 to create enterprise-grade, highly scalable websites About This Book Build complete, complex websites with no prior knowledge of web development entirely using the intuitive Drupal user interface Ensure your sites are modern, responsive and mobile-friendly through utilizing the full features available in Drupal 8 Quickly master theme administration, custom block layouts, views, and the Twig template structure Who This Book Is For This course is suitable for web developers, designers, as well as web administrators who are keen on building modern, scalable websites using Drupal 8 and its wide range of new features. What You Will Learn Set up a local “stack” development environment and install your first Drupal 8 site Find out what is available in the Drupal 8 core Integrate third-party front-end and back-end libraries with Drupal Understand the plugin system that powers many of Drupal 8's new APIs to extend its functionality Build custom block layouts with reusable and fieldable blocks Work with the new Twig PHP templating engine Develop a theme from scratch following a step-by-step project outline In Detail This Drupal 8 course takes you through the journey of building, extending, and customizing websites to build highly scalable and enterprise-ready websites. The first part—Learning Drupal 8—takes you step by step through building a Drupal 8 website. You will start with the basics, such as setting up a local “stack” development environment and installing your first Drupal 8 site, then we move on to image and media handling and extending Drupal modules. This section will help you get to grips with the modular nature of Drupal, and you’ll learn how to extend it by adding new functionalities to create your new modules. After learning to develop and manage a modern and responsive website using Drupal 8, you’ll start exploring different techniques to take advantage of the new Drupal 8 features. The next module—Drupal 8 Development Cookbook—is your go-to guide to experimenting with all of Drupal 8’s features through helpful recipes. You will explore techniques to customize and configure the Drupal environment, create blocks and custom modules, as well as make your web apps responsive by harnessing the mobile-first feature of Drupal 8. This module will also show you how to incorporate multilingual facilities in your sites, use web services and third-party plugins with your applications from inside Drupal 8, and test and deploy your apps. In the third part—Drupal 8 Theming with Twig—you will master Drupal 8’s new Twig templating engine to customize the look and feel of your website. This section will walk you through a real-world project to create a Twig theme from concept to completion while adopting best practices to implement CSS frameworks and JavaScript libraries. You will see just how quick and easy it is to create beautiful, responsive Drupal 8 websites while avoiding the common mistakes that many front-end developers make. By the end, you will have learned how to develop, manage, extend, and customize an enterprise-level website. This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products: Learning Drupal 8 by Nick Abbott and Richard Jones Drupal 8 Development Cookbook by Matt Glaman Drupal 8 Theming with Twig by Chaz Chumley Style and approach This course offers a thorough coverage of developing, managing, extending, and designing highly scalable websites using the Drupal 8 platform. Filled with practical examples and recipes, this course is a great combination of example-driven learning complemented by interesting techniques to take advantage of the Drupal platform.
目录展开

Drupal 8: Enterprise Web Development

Table of Contents

Drupal 8: Enterprise Web Development

Credits

Preface

What this learning path covers

What you need for this learning path

Who this learning path is for

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Module 1

1. Introduction

What is Drupal?

Dynamic web pages – a brief history

Enter the database

A worldwide community

The success of Drupal

Multiple systems integration

Technical debt

Developer knowledge

Modularity

There's a module for that

Some Drupal history

Language choice

Is Drupal a framework or platform?

Embracing other communities' frameworks

How an open source community works

Summary

2. Installation

System requirements

PHP

Web server options

Database options

Browser options

Setting up a development environment

Free cloud hosting

Acquia Dev Desktop

Installing Drupal 8

Configuring your Drupal 8 site

Troubleshooting your installation

Memory settings

PHP timeouts

Trusted host patterns

Summary

3. Basic Concepts

Modules

Core and contrib modules

Where the core modules live

Where your extension modules should live

An example community module

Evaluating new modules

Documentation

Module versions

Entities, nodes, and fields

Entities

Nodes

Node types

Fields

Adding new fields

Field types

General

Number

Reference

Text

Field settings

Field widgets

Form display

Managing the form display

Managing field display

Drupal 8 core entity types

Taxonomy

Fixed terms or tags

Blocks

Views

Users, roles, and permissions

Themes

Administration themes

Base themes and subthemes

Hooks

Summary

4. Getting Started with the UI

The Drupal 8 user interface

Logging out

Logging in

Front page

Repositioning the tray

Responsiveness

Administration theme

Contextual links

Quick content creation

Listing content

Revisiting the home page

Structure

Block layout

Comment types

Contact forms

Personal contact form

Content types

Customizing a content type

Customizing fields

Customizing content entry screens

Customizing the display

Display modes

View modes

Form modes

Menus

Taxonomy

Views

Configuration

Appearance

People

Reports

Extend

Summary

5. Basic Content

Introducing your site-building scenario

Types of content

Pages

Articles

Clients

Services

Testimonials

FAQs

Contact information

SEO considerations

Basic pages

Creating a new page

Title

Body

Body field summary

Rich text toolbar

Default HTML restrictions

Full HTML

Restricted HTML

Adding a page to the main navigation menu

Nodes and unique IDs

Adding more pages

Articles

Creating a new article

Front page promotion

Adjusting the settings for a content type

Disabling front page promotion

Adjusting comment settings

Disabling future comments

No retrospective action

Retrospective action

Threading

Show reply form on the same page as comments

Preview comments before posting

Removing all comments and the ability to comment

Summary

6. Structure

Managing menus

Reorganizing menu items

Editing menu items

Managing taxonomy

Creating a new Taxonomy vocabulary

Re-ordering Taxonomy terms

Apply a taxonomy vocabulary to content types

Adjusting the order of fields when editing

Categorizing content

Viewing categorized content

Segregating article types using taxonomy

Creating another taxonomy vocabulary

Working with the Views module

Creating a Views-powered News page

View wizard

Creating a new view

Renaming a display

Live preview

Content settings

Page settings

Filtering to News only

Creating a blog page

Working with Views blocks

Creating blocks using Views

Placing the News blocks

Block position

Block visibility

Summary

7. Advanced Content

Field types

Extending content types

Adjusting field settings

Forcing the Article type field to be mandatory

Adjusting edit form settings

Placeholder text

Customizing view modes

Removing the labels and fields from the display

Controlling image size using styles

Creating new content types

Creating the Client content type

Inherited fields

Adding a logo field

Tokens

Image accessibility

Linking clients to their web sites

Providing an e-mail address for a Client

Providing a telephone number for a Client

Marking a Client as high profile

Attaching taxonomy

Reusing fields

Adjusting field display settings

Adding a sorted client list to the Clients page

Views sort criteria

Adding a pager to your view

Creating the Service content type

Enabling the linking of Services to Clients

Displaying services listing using Views

Creating the Testimonial content type

Listing testimonials with a view

Creating a grouped view

The FAQ content type

Content type settings

Field settings

Display settings

Creating the simple FAQ page

Adding interactive querying to a view

Summary

8. Configuration

People – Account settings

Contact settings

Anonymous users

Administrator role

Registration and cancellation

Enable password strength indicator

Account cancelation behavior

Notification e-mail address

Emails

System

Site information

Cron

Content authoring

Text formats and editors

Available filters

User interface

Shortcuts

Development

Performance

Caching

Clear cache

Bandwidth optimization

Logging and errors

Maintenance mode

Configuration synchronization

Media

File system

Image styles

Image toolkit

Search and metadata

Indexing progress

Indexing throttle

Default indexing settings

Logging

Search pages

URL Aliases

Regional and language

Regional settings

Locale

Time zones

Date and time formats

Web services

RSS publishing

Summary

9. Users and Access Control

Users and roles

Permissions

Typical roles

A typical scenario

Creating user accounts

User ID 1

Editing accounts

Taking control of the People page

Summary

10. Optional Features

Activity Tracker

Aggregator

Ban

Book

Forum

Containers

Forum settings

Hot topics

Topics per page

Default order

Forum permissions

Contributing Forum topics

Responsive image

Statistics

Syslog

Core (experimental), Multilingual, and Web services

Summary

11. Reports

Accessing reports

Available updates

Recent log messages

Log details

Filtering log messages

Clearing logs

Log messages and performance

Field list

Status report

Top 'access denied' errors

Top 'page not found' errors

Top search phrases

Views plugins

Summary

12. Extending Drupal

Installing a module

Improving FAQs

Downloading the Views Accordion module

Installing the module through the UI

Pathauto and Token

Generating paths from patterns

Pathauto settings

Summary

13. Theming Drupal

What is a theme?

Terminology

Themes included in Drupal 8

Accessible via the UI

Bartik

Seven

Stark

Base themes

Classy

Stable

Setting the active theme

Common settings

Toggle display

Theme regions

Color scheme

Setting the admin theme

Advanced themes from the Drupal community

Installing a new theme

Custom themes

Base themes and subthemes

Summary

14. Getting Support

What is open source?

The Drupal community

Drupal.org

Issue queues

Reporting a bug or requesting support

The Drupal security team

api.drupal.org

IRC chat

The Drupal Association

DrupalCon

DrupalCamps

Specialist Drupal companies

Training

Certification

Summary

2. Module 2

1. Up and Running with Drupal 8

Introduction

Installing Drupal

Getting ready

How to do it…

How it works…

There's more…

Creating a database user and a database

Database prefixes

Downloading and installing with Drush

Security updates

See also

Using a distribution

How to do it…

How it works…

There's more…

Makefiles

Installing with Drush

See also…

Installing modules and themes

Getting ready

How to do it…

How it works…

Discovering modules and themes

Module installation

Theme installation

There's more…

Installing a module with Drush

Uninstalling a module

See also…

Using multisites in Drupal 8

Getting ready

How to do it…

How it works…

There's more…

Security concerns

See also…

Tools for setting up an environment

Getting ready

How to do it…

How it works…

There's more…

Acquia Dev Desktop

XAMPP + Bitnami

Kalabox

See also…

Running Simpletest and PHPUnit

Getting ready

How to do it…

How it works…

There's more…

Is run-tests a shell script?

Running Simpletest without Drupal installed

Running specific tests

DrupalCI

See also…

2. The Content Authoring Experience

Introduction

Configuring the WYSIWYG editor

Getting ready

How to do it…

How it works…

There's more…

Filter module

CKEditor plugins

See also

Adding and editing content

Getting ready

How to do it…

How it works…

There's more

Save as draft

Pathauto

Bulk moderation

See also

Creating a menu and linking content

Getting ready

How to do it…

How it works…

There's more…

Managing a contents menu link from its form

Providing inline editing

How to do it…

How it works…

Creating a custom content type

How to do it…

How it works…

Applying new Drupal 8 core field types

Getting ready

How to do it…

Link

The e-mail field

The Telephone field

Date

The Entity Reference

How it works…

There's more…

Upcoming updates

Views and Entity Reference

See also

Customizing the form display of a node

How to do it…

How it works…

There's more…

Managing form display modes

Programmatically providing a default to hidden form items

See also

Customizing the display output of a node

How to do it…

How it works…

3. Displaying Content through Views

Introduction

Listing content

Getting ready

How to do it…

How it works…

There's more…

Views in Drupal Core Initiative

Views and displays

Format style plugins: style and row

Using the Embed display

See also

Editing the default admin interfaces

How to do it…

How it works…

There's more…

Exposed versus non-exposed

Filter identifiers

Overriding routes with Views

Creating a block from a View

Getting ready

How to do it…

How it works…

There's more…

Exposed forms as blocks

See also

Utilizing dynamic arguments

How to do it…

How it works…

There's more…

Previewing with contextual filters

Displaying as a tab on the user page

Altering the page title

Validation

Multiple and exclusion

Adding a relationship in a View

How to do it…

How it works…

There's more…

Relationships provided by entity reference fields

Relationships provided through custom code

Using Aggregation and views.

Providing an Entity Reference result View

How to do it…

How it works…

There's more…

View arguments

See also

4. Extending Drupal

Introduction

Creating a module

How to do it...

How it works...

There's more...

Module namespaces

Module discovery locations

Defining a package group

Module dependencies

Specifying the module's version

See also...

Defining a custom page

Getting ready

How to do it…

How it works…

There's more…

Parameters in routes

Validating parameters in routes

Route requirements

Providing dynamic routes

Altering existing routes

See also

Defining permissions

Getting ready

How to do it…

How it works...

There's more…

Restrict access flag for permissions

Defining permissions programmatically

Checking whether a user has permissions

Providing the configuration on installation or update

Getting ready

How to do it…

How it works…

There's more…

Configuration subdirectories

Modifying the existing configuration on installation

See also

Using Features 2.x

How to do it...

How it works…

There's more…

Suggested feature modules

Features bundles

Managing the configuration state of Features

See also

5. Frontend for the Win

Introduction

Creating a custom theme based on Classy

How to do it...

How it works...

There's more...

Theme screenshots

Themes, logos, and favicons

Base themes and shared resources

CKEditor stylesheets

See also

Using the new asset management system

Getting ready

How to do it...

How it works...

There's more…

CSS groups

Library asset options

Library dependencies

Overriding and extending other libraries

Using a CDN or external resource as a library

Manipulating libraries from hooks

Placing JavaScript in the header

See also

Twig templating

Getting ready

How to do it...

How it works...

There's more…

Security first

Theme hook suggestions

Debugging template file selection and hook suggestions

The Twig logic and operators

See also

Using the Breakpoint module

Getting ready

How to do it...

How it works...

There's more...

Caveat for providing breakpoints from themes

Accessing breakpoints programmatically

Multipliers

See also

Using the Responsive Image module

Getting ready

How to do it...

How it works...

There's more...

Performance first delivery

Removing picturefill polyfill

See also

6. Creating Forms with the Form API

Introduction

Creating a form

Getting ready

How to do it…

How it works…

There's more…

Form element definitions

The form state

The form cache

See also

Using new HTML5 elements

Getting ready

How to do it…

How it works…

There's more…

Specific element properties

Creating new elements

See also

Validating form data

Getting ready

How to do it…

How it works…

There's more…

Multiple validation handlers

Accessing multidimensional array values

Element validation methods

Processing submitted form data

Getting ready

How to do it…

How it works…

There's more…

Multiple submit handlers

See also

Altering other forms

Getting ready

How to do it…

How it works…

There's more…

Adding additional validate handlers

Adding additional submit handlers

7. Plug and Play with Plugins

Introduction

Creating blocks using plugins

Getting ready

How to do it…

How it works...

There's more...

Altering blocks

Block settings forms

Defining access to a block

See also

Creating a custom field type

Getting ready

How to do it…

How it works…

There's more…

Altering field types

Defining whether a field is empty

See also

Creating a custom field widget

Getting ready

How to do it…

How it works...

There's more

Field widget settings and summary

See also

Creating a custom field formatter

Getting ready

How to do it…

How it works…

There's more

Formatter settings and summary

See also

Creating a custom plugin type

Getting ready

How to do it…

How it works…

There's more

Specifying an alter hook

Using a cache backend

Accessing plugins through the manager

See also

8. Multilingual and Internationalization

Introduction

Translating administrative interfaces

Getting ready

How to do it…

How it works…

There's more…

Manually installing language files

Checking translation status

Exporting translations

Interface translation permissions

Using interface translation to customize default English strings

Interface text language detection

Providing translations for a custom module

See also

Translating configuration

Getting ready

How to do it…

How it works…

There's more…

Altering configuration translation info definitions

Translating views

See also

Translating content

Getting ready

How to do it…

How it works

There's more

Flagging translations as outdated

Translating content links

Defining translation handlers for entities

See also

Creating multilingual views

Getting ready

How to do it…

How it works…

There's more…

Translating exposed form items and filters

Translating display and row format items

Translating page display menu items

See also

9. Configuration Management – Deploying in Drupal 8

Introduction

Importing and exporting configurations

Getting ready

How to do it…

How it works…

There's more…

Configuration dependencies

Saving to a YAML file for a module's configuration installation

Configuration schemas

See also

Synchronizing site configurations

Getting ready

How to do it…

How it works…

There's more…

Universally Unique Identifier

A synchronization folder

Installing a configuration from a new site

Using command-line workflow processes

Getting ready…

How to do it…

How it works…

There's more…

Drush config-pull

Using the Drupal Console

Editing the configuration from the command line

Exporting a single configuration item

Using version control and command-line workflow

See also

Using the filesystem for configuration storage

How to do it…

How it works…

There's more…

Deprecated for Drupal 9

See also

10. The Entity API

Introduction

Creating a configuration entity type

Getting ready

How to do it…

How it works

There's more…

Available data types for schema definitions

See also

Creating a content entity type

Getting ready

How to do it…

How it works…

There's more…

Using the AdminHtmlRouteProvider provider

Simplifying base field definitions using the Entity module

The entity type's admin permission

Making the collection route a local task tab

See also

Creating a bundle for a content entity type

Getting ready

How to do it…

How it works…

There's more…

Provide action links for adding new bundles

See also

Implementing custom access control for an entity

Getting ready

How to do it…

How it works…

There's more…

Controlling access to entity fields

See also

Providing a custom storage handler

Getting ready

How to do it…

How it works…

There's more…

Utilizing a different storage backend for an entity

See also

Creating a route provider

Getting ready

How to do it…

How it works…

There's more…

The Entity API module provides add generation

Providing a collection route

See also

11. Off the Drupalicon Island

Introduction

Implementing and using a third-party JavaScript library

Getting ready

How to do it…

How it works…

See also

Implementing and using a third-party CSS library

Getting ready

How to do it…

How it works…

See also

Implementing and using a third-party PHP library

Getting ready

How to do it…

How it works…

See also

Using Composer manager

Getting ready

How to do it…

How it works…

There's more…

Updating the Stack/Cors recipe

See also

12. Web Services

Introduction

Enabling RESTful interfaces

Getting ready

How to do it…

How it works…

There's more…

Soft dependency on the HAL module

RestResource plugin to expose data through RESTful Web Services

The REST UI module

Rate limiting your API

See also

Using GET to retrieve data

Getting ready

How to do it…

How it works…

There's more…

Using _format instead of the Accept header

See also

Using POST to create data

Getting ready

How to do it…

How it works…

There's more…

Understanding available _links requirements

Working with images

Using Cross-Site Request Forgery tokens

See also

Using PATCH to update data

Getting ready

How to do it…

How it works…

See also

Using Views to provide custom data sources

How to do it…

How it works…

There's more…

Controlling the key name in JSON output

Controlling access of RESTful Views

Add a URL formatter for the image field

See also

Authentication

Getting ready

How to do it…

There's more…

Authentication provider services

Page cache request policies and authenticated web service requests

IP Authentication Provider

See also

13. The Drupal CLI

Introduction

Rebuilding cache in Console or Drush

How to do it…

How it works…

Using Drush to interact with the database

Getting ready

How to do it…

How it works…

There's more…

Using gzip with sql-dump

Using Console to interact with the database

See also

Using Drush to manage users

How to do it…

How it works…

There's more…

Advanced user-login use cases

Using Drupal Console

Scaffolding code through Console

Getting ready

How to do it…

How it works…

Making a Drush command

Getting ready

How to do it…

How it works…

There's more…

Specifying the level of Drupal's bootstrap

See also

Making a Console command

Getting ready

How to do it…

How it works…

There's more…

Using a Console command to create entities

See also

3. Module 3

1. Setting Up Our Development Environment

Installing an AMP (Apache, MySQL, PHP) stack

Introducing MAMP

Downloading MAMP

Installing MAMP

A quick tour of MAMP PRO

General settings for MAMP PRO

Host settings

Installing Drupal 8

Downloading Drupal 8

Creating our document root

Creating our host entry

Creating a new database for Drupal

Using phpMyAdmin

Completing Drupal 8 installation

Choosing a language

Choosing a profile

Verifying requirements

Database configuration

Configuring the site

Site maintenance account

Regional settings

Update notifications

Reviewing the new admin interface

Exploring the admin menu

Previewing the interface

Exploring Drupal 8 folder structure

The core folder

The modules folder

The sites folder

The themes folder

Using the project files

Downloading and extracting the exercise files

Database backup

Export settings

Database restore

Using Google Chrome to inspect elements

Summary

2. Theme Administration

What is a theme?

Exploring the Appearance interface

Drupal's core themes

Bartik

Seven

Stark

Classy

Theme states

Installed themes

Uninstalled themes

Default theme

Installing and uninstalling themes

Step one – installing a theme

Step two – uninstalling a theme

Theme settings

Toggling the display of page elements

Logo image settings

Shortcut icon settings

Theme-specific settings

Using prebuilt themes

Installing a new theme

Installing from a URL

Uploading a module or theme archive to install

Manually installing a theme

Cleaning up our themes folder

Managing content with blocks

Exploring the Block layout

Blocks and regions

Demonstrating block regions

Placing blocks into regions

Configuring a block

Managing the title

Managing visibility settings

Content types restriction

Page restriction

Role restriction

Creating a custom block

Managing custom blocks

Exploring the custom block library

Exploring block types

Managing fields

Managing display

Summary

3. Dissecting a Theme

Setting up a local development environment

Managing sites/default folder permissions

Configuring settings.local.php

Disabling CSS and JS aggregation

Disabling render and page cache

Disabling test modules and themes

Default themes versus custom themes

Folder structure and naming conventions

Managing configuration in Drupal 8

Reviewing the new info.yml file

Metadata

Libraries

Defining a library

Overriding libraries

Extending libraries

Attaching a library

Using Twig to attach a library

Using the preprocess functions to attach a library

Regions

The role of templates in Drupal

How templates work

Where to find templates

Creating our first basic theme

Step One – creating a new folder

Step two – create an info file

Step three – copy core templates

Step four – include a screenshot

Step five – installing our theme

Step six – Welcome to Twig

Introducing Twig

Enabling Twig debug

Twig fundamentals

Commenting variables

Setting variables

Printing variables

Dumping variables

Filters

Control structures

Template variables

The role of the theme file in Drupal

Preprocessors and hooks

Overriding variables

Summary

4. Getting Started – Creating Themes

Starter themes

Creating a Bootstrap starter

Understanding grids and columns

Setting up a theme folder

Adding a screenshot

Configuring our theme

Installing our theme

Working with libraries

Adding assets

Creating a library reference

Including our library

Creating a Jumbotron

Step one – managing block content

Step two – hiding the page title

Rethinking our layout

Adding regions

Managing the block content

Using Twig templates

Creating a homepage template

Creating region templates

Working with the Theme layer

Using Devel to print variables

Printing variables from a function

Subthemes

Adding the theme folder

Including a screenshot

Configuring our theme

Installing our theme

Touring Classy

Overriding a library

Summary

5. Prepping Our Project

Walking through the design mockup

Homepage layout

Defining homepage regions and user interaction

Basic page layout

Defining interior regions

Landing page layout

Blog detail layout

Contact page

Search results

Restoring our database snapshot

Creating a custom theme

Setting up theme folders

Adding a screenshot

Creating our configuration file

Installing our theme

Setting up our regions

Setting up our assets

Adding additional assets

Handling default files

Summary

6. Theming Our Homepage

Creating our HTML wrapper

Introducing web fonts

Creating our homepage

Using page templates

Working with static content

Implementing our Header Top region

Creating our Social Icons block

Installing Font Awesome library

Refactoring Header Top region

Implementing our Header region

Adding a logo

Enabling Site branding

Printing our Header region

Creating Block templates

Implementing our search form block

Placing our search form block

Creating a search form block template

Adding custom JavaScript

Creating an input element template

Working with menus

Creating a menu template

Creating System Menu block template

Creating a sticky header

Implementing our Headline Region

Creating our Headline View and Block

Adding our Headlines Block

Printing our Headline region

Configuring FlexSlider library

Attaching a library using Twig

Enable FlexSlider

Implementing Parallax

Adding a scroll effect

Enabling the scroll script

Attaching ScrollTo library using Twig

Implementing our Before Content region

Creating our Services block

Creating our Features block

Refactoring Before Content region

Implementing the footer

Creating our custom blocks

Refactoring our main footer

Footer first

Footer second

Footer third

Footer bottom left

Footer bottom right

Summary

7. Theming Our Interior Page

Reviewing the About Us mockup

Creating our interior page template

Adding our Global Header

Implementing our page title

Working with static HTML

Adding new regions

Reassigning the Page title block

Printing the Title Bar region

Creating a block template

Implementing our main page structure

Creating a Node template

Implementing our Team members section

Prepping our Team Member View

Creating our Team Member View

Managing our Team Members listing block

Formatting Views with CSS

Adding CSS classes to Views

Using Twig variables to rewrite field content

Rearranging View fields

Adding a View header

Refactoring the After Content region

Adding our global footer

Fixing JavaScript errors

Summary

8. Theming Our Blog Listing Page

Reviewing the Blog Listing mockup

Creating our blog listing

Adding a new display mode

Managing the display

Enabling fields

Field label visibility

Formatting fields

Creating a Post Listing view

Using Content Display modes with views

Managing our Post Listing block

Implementing our Node template

Adding CSS classes to Twig

Working with content variables

Using the without filter

Creating our post image slider

Working with field templates

Adding the Owl Carousel library

Using Twig filters for dates

Printing title and teaser

Creating our post metadata

Field templates and taxonomy

Handling comments in Drupal 8

Creating a theme file

Printing our comment count

Adding a read more link

Creating a Categories block

Managing our Categories block

Implementing responsive sidebars

Theming a Block template

Drupal Views and Twig templates

Managing popular versus recent content

Creating our recent posts block

Creating our popular posts block

Sorting views by comment count

Attaching a view to the footer

Managing our popular posts block

Using Twig and Bootstrap tabs

Recent Posts Twig template

Popular Posts Twig template

Using Views-view templates

Creating a Post Teaser Twig template

Adding the About Us block

Implementing the About Us template

Summary

9. Theming Our Blog Detail Page

Reviewing the Blog detail mockup

Previewing our Blog detail page

Creating a Post Full template

Altering fields

Working with comments

Introducing Comment types

Reviewing Default Comment type fields and display

Enabling Post Type Comments field

Creating a Field Comments template

Theming the Comment thread

Enabling user photos for Comment threads

Cleaning up the User Picture field

Creating the Field User Picture template

Date and time formats

Implementing social sharing capabilities

The Add This buttons

Creating a library entry

Attaching the library to our Blog detail page

Displaying buttons

Summary

10. Theming Our Contact Page

Reviewing the contact page mockup

Introducing contact forms

Editing a contact form

Managing form fields

Managing form display

Contact page layout

Adding a Callout block

Creating the Callout block template

Integrating Google Maps into our contact page

Configure Google Maps

Creating our Google Maps block

Creating the Callout Map template

Summary

11. Theming Our Search Results

Reviewing the Search Results mockup

Looking at default Search results

Introducing core search

Indexing content

Editing search pages

Disabling search pages

Working with Search Results templates

Modifying the item list template

Cleaning up each result

Search alternatives

Search API

Installing the Search API

Adding a server

Adding an index

Configuring bundles

Adding fields to our index

Creating a Search Results View

Using the Search index view mode

Adding filter criteria

Placing our exposed search form

Adding our placeholder attribute

Using our search form

Displaying the number of search results

Adding a No Results message

Summary

12. Tips, Tricks, and Where to Go from Here

Working with Local Tasks

Theming local tasks

Working with Status messages

Adding the Highlighted region

Theming our Status message block

Reusing Twig templates

Using extends to share layouts

Working with Twig blocks

Where do we go from here?

Summary

A. Biblography

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部