Hello Im Carlos Im Brad Full Stack Drupal Developer Web Designer - - PowerPoint PPT Presentation

hello
SMART_READER_LITE
LIVE PREVIEW

Hello Im Carlos Im Brad Full Stack Drupal Developer Web Designer - - PowerPoint PPT Presentation

Hello Im Carlos Im Brad Full Stack Drupal Developer Web Designer & Developer Who Are These Guys? Whats the Problem? DEVELOPER STRAIN NO CMS MORE EVENTS Increasing number of hosted Developers were required for Historically


slide-1
SLIDE 1
slide-2
SLIDE 2

Hello

I’m Carlos

Full Stack Drupal Developer

I’m Brad

Web Designer & Developer

slide-3
SLIDE 3

Who Are These Guys?

slide-4
SLIDE 4

What’s the Problem?

MORE EVENTS

Increasing number of hosted conferences each year.

DEVELOPER STRAIN

Developers were required for deploying and maintaining many features.

NO CMS

Historically content owners could not manage their own content

slide-5
SLIDE 5

What are we doing wrong?

Hire a lazy person to do a difficult job. Why? Because a lazy person will find an easy way to do it. “ ”

  • Bill Gates
slide-6
SLIDE 6

What are the Revamp Requirements?

▪ Each site has standardized & custom pages ▪ Attendee registration ▪ Collect Abstracts ▪ Attendee wait list ▪ Cloning ▪ Reusable assets (venues, hotels, transportation, etc) ▪ Visual branding per conference host ▪ Empower conference coordinators ▪ User roles & permissions schemas

slide-7
SLIDE 7

Why Drupal?

Just kidding. You know why.

slide-8
SLIDE 8

Option 1:

Drupal Multi-Site

slide-9
SLIDE 9

Option 2:

Traditional Node-Per-Page Approach

slide-10
SLIDE 10

Option 3:

Single Node Website

slide-11
SLIDE 11

The Winner Is…

“wiener” … get it?

slide-12
SLIDE 12

The Winner Is…

Single Node Website!

slide-13
SLIDE 13

About the Solution

▪ Drupal 8

▪ Composer ▪ MariaDB

▪ Modules

▪ Contrib

▪ ACL (Access Control) + Content Access ▪ Add to Calendar ▪ Better Exposed Filters ▪ Computed Field + Computed Field PHP Formatter ▪ Conditional Fields ▪ Entity Clone ▪ Entity Construction Kit (ECK) ▪ Inline Entity Form ▪ Paragraphs ▪ Pathauto + Sub-pathauto ▪ Rules ▪ Serialization (CSV + Excel) ▪ Simple Google Maps ▪ View Mode Page ▪ Webform + Webform Views

▪ Modules (cont’d)

▪ Custom

▪ Calendar Tokens ▪ Conference Archive ▪ Conference Form Settings ▪ Date Range ▪ DMS Theme Functions ▪ Driving Distance Calculator ▪ Dynamic Pages (Routing and more) [this replaced View Mode Page] ▪ Export Data ▪ Inline Entity Field Dropdown

▪ Themes

▪ Contrib

▪ Omega ▪ Seven

▪ Custom

▪ Ncif_Omega ▪ Conferences_Omega ▪ Conferences_Seven

slide-14
SLIDE 14

Creating / Editing Content:

General Information

slide-15
SLIDE 15

Creating / Editing Content:

Admin Twig Templates

slide-16
SLIDE 16

Creating / Editing Content:

Preprocess Logic

slide-17
SLIDE 17

Management & Config

Global Page Specific

slide-18
SLIDE 18

Viewing Content:

Types of Pages

slide-19
SLIDE 19

Twig Templates

HTML Template Page Template Sidebar Template Node Template(s)

slide-20
SLIDE 20

Viewing Content:

Archiving Old Content

slide-21
SLIDE 21

The Secret Sauce:

Communication of the Components

▪ On Node Save ▪ Routing.yml ▪ Routing Controller ▪ On URI Request ▪ Dynamic Page Controller

▪ URI Validation ▪ Field Validation ▪ Theme Suggestion

slide-22
SLIDE 22

The Secret Sauce:

Dynamic Routing

route_callbacks:

  • '\Drupal\dynamic_pages\Routing\DynamicRoutes::routes'

Step 1 – Create an array of all the page types and their uri Step 2 - Search for the {page} variable from the url within the array

https://ncifrederick.cancer.gov/events/conferences/CONFERENCENAME/PAGE

Step 3a - If the variable is found in the array, return response suggesting a theme Step 3b - If the variable is not found in the array, throw a NotFoundHttpException();

$nids = \Drupal::entityQuery('node')->condition('type','conference')->execute(); $nodes = \Drupal\node\Entity\Node::loadMultiple($nids); $routes = new RouteCollection(); foreach ($nodes as $node){ $nid = $node->id(); $conferenceName = \Drupal::service('path.alias_manager')->getAliasByPath('/node/'.$nid); $routes->add( 'dynamic_pages.' . $nid, new Route( $conferenceName .'/{page}', array( '_controller' => '\Drupal\dynamic_pages\Controller\DynamicPages::content’, '_title' => $node->getTitle(), 'nid' => $nid ), array( '_permission' => 'access content’ ) ) ); } return $routes;

slide-23
SLIDE 23

The Secret Sauce:

Preprocess

slide-24
SLIDE 24

The Secret Sauce:

Twig Templates

slide-25
SLIDE 25

Other Stuff & Junk:

Access Control

Traditional Roles Access Control Module

slide-26
SLIDE 26

Other Stuff & Junk:

Domain Names

  • a. We only use a single domain name. Our “site” URI’s:
  • a. http://domainname.com/SITENAME-1/*
  • b. http://domainname.com/SITENAME-2/*
  • c. http://domainname.com/SITENAME-3/*
  • b. What About Multiple Domains:
  • a. Domain Access
  • https://www.drupal.org/project/domain
  • b. Micro Site/Node (Alpha)
  • https://www.drupal.org/project/micro_site
  • https://www.drupal.org/project/micro_node
  • c. Articles about this
  • https://blog.weareconvivio.com/managing-microsites-with-drupal-8-

f3c08bcb316a

  • https://www.flocondetoile.fr/blog/small-sites-large-sites-micro-sites-drupal-8
slide-27
SLIDE 27

Other Stuff & Junk:

The Good & The Bad

▪ The Bad

▪ We lost some data-- Oops! (we recovered, thank you backups!) ▪ Caused panic with security updates ▪ Composer learning curve ▪ Rewrote multiple modules, then rewrote again

▪ The Good

▪ So much time saved! ▪ Customer has full control ▪ GovCon validated us ▪ Our toolbox has grown

slide-28
SLIDE 28

The Single Node Website

Any Questions?

Brad Robertson

Web Designer & Developer design.bradford@gmail.com

Carlos Fernandez Martinez

Drupal Developer carlosrfm@icloud.com

Feel free to contact us, as well–