hello
play

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


  1. Hello I’m Carlos I’m Brad Full Stack Drupal Developer Web Designer & Developer

  2. Who Are These Guys?

  3. What’s the Problem? DEVELOPER STRAIN NO CMS MORE EVENTS Increasing number of hosted Developers were required for Historically content owners could deploying and maintaining not manage their own content conferences each year. many features.

  4. 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

  5. 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

  6. Why Drupal? Just kidding. You know why.

  7. Option 1: Drupal Multi-Site

  8. Option 2: Traditional Node-Per-Page Approach

  9. Option 3: Single Node Website

  10. The Winner Is… “wiener” … get it?

  11. The Winner Is… Single Node Website!

  12. About the Solution ▪ Drupal 8 ▪ Modules (cont’d) Composer Custom ▪ ▪ MariaDB Calendar Tokens ▪ ▪ Conference Archive ▪ ▪ Modules Conference Form Settings ▪ Contrib ▪ Date Range ▪ ACL (Access Control) + Content Access ▪ DMS Theme Functions ▪ Add to Calendar ▪ Driving Distance Calculator ▪ Better Exposed Filters ▪ Dynamic Pages (Routing and more) ▪ [this replaced View Mode Page] ▪ Computed Field + Computed Field PHP Formatter Export Data ▪ ▪ Conditional Fields Inline Entity Field Dropdown ▪ ▪ Entity Clone ▪ Themes Entity Construction Kit (ECK) ▪ Contrib ▪ Inline Entity Form ▪ Omega ▪ Paragraphs ▪ Seven ▪ Pathauto + Sub-pathauto ▪ Custom ▪ Rules ▪ Serialization (CSV + Excel) Ncif_Omega ▪ ▪ Simple Google Maps Conferences_Omega ▪ ▪ View Mode Page Conferences_Seven ▪ ▪ Webform + Webform Views ▪

  13. Creating / Editing Content: General Information

  14. Creating / Editing Content: Admin Twig Templates

  15. Creating / Editing Content: Preprocess Logic

  16. Management & Config Global Page Specific

  17. Viewing Content: Types of Pages

  18. Twig Templates HTML Template Page Template Sidebar Template Node Template(s)

  19. Viewing Content: Archiving Old Content

  20. The Secret Sauce: Communication of the Components ▪ On Node Save ▪ On URI Request ▪ Routing.yml ▪ Dynamic Page Controller ▪ Routing Controller URI Validation ▪ Field Validation ▪ Theme Suggestion ▪

  21. The Secret Sauce: Dynamic Routing $nids = \Drupal::entityQuery('node')->condition('type','conference')->execute(); $nodes = \Drupal\node\Entity\Node::loadMultiple($nids); $routes = new RouteCollection(); route_callbacks: foreach ($nodes as $node){ Step 1 – Create an array of all the page types and their uri - '\Drupal\dynamic_pages\Routing\DynamicRoutes::routes' $nid = $node->id(); $conferenceName = \Drupal::service('path.alias_manager')->getAliasByPath('/node/'.$nid); Step 2 - Search for the {page} variable from the url within the array $routes->add( 'dynamic_pages.' . $nid, https://ncifrederick.cancer.gov/events/conferences/CONFERENCENAME/PAGE new Route( $conferenceName .'/{page}', array( '_controller' => '\Drupal\dynamic_pages\Controller\DynamicPages ::content’, Step 3a - If the variable is found in the array, return response '_title' => $node->getTitle(), 'nid' => $nid suggesting a theme ), array( '_permission' => 'access content’ Step 3b - If the variable is not found in the array, throw a ) NotFoundHttpException(); ) ); } return $routes;

  22. The Secret Sauce: Preprocess

  23. The Secret Sauce: Twig Templates

  24. Other Stuff & Junk: Access Control Traditional Roles Access Control Module

  25. 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

  26. Other Stuff & Junk: The Good & The Bad ▪ The Good ▪ The Bad ▪ We lost some data-- Oops! ▪ So much time saved! (we recovered, thank you ▪ Customer has full control backups!) ▪ GovCon validated us ▪ Caused panic with security ▪ Our toolbox has grown updates ▪ Composer learning curve ▪ Rewrote multiple modules, then rewrote again

  27. The Single Node Website Any Questions? Feel free to contact us, as well – Carlos Fernandez Martinez Brad Robertson Web Designer & Developer Drupal Developer carlosrfm@icloud.com design.bradford@gmail.com

Recommend


More recommend