SlideShare una empresa de Scribd logo
1 de 71
Marky Markup
and the Funky Bunch
Best Practices for Generating Markup in Drupal
About Us
Drew Trafton
dtraft on drupal.org
email: drew(at)bowst(dot)com
Social media is not my thing
JP McNeal
@jpmcneal
peezy on drupal.org
I love a good puzzle
About Bowst
Let’s Talk
650 Islington St
Portsmouth NH,
03801
info@bowst.com
🔗 bowst.com
Common strategies for managing markup
WYSIWYG Text Editors
Theme template files (.tpl.php)
Views
template.php functions
Fences Module
Display Suite
Evaluation Criteria
User ease of use
Flexibility
Cleanliness of Markup
Level of Effort
Comfort level with PHP
Drupal Page Lifecycle
Drupal Page Lifecyle
Request path
mapped to
internal path
Hooks and
Theming
functions
.tpl.php
Module loads
content
WYSIWYG Text Editors
Overview
Drupal 7
Install CKEditor or wysiwyg module and the
text editor of your choice
Configure
Click the edit tab
Drupal 8
Click the edit tab
More complex layouts, use wysiwyg_template
Download Wysiwyg API template plugin module (2.x-dev)
Download the text editor of your choice to sites/all/libraries
Install and configure the Wysiwyg Template module
Wysiwyg Templates
Wysiwyg Templates
Wysiwyg Templates
Wysiwyg Templates
Wysiwyg Templates
Survey Says… Wysiwyg Templates!!!
Ease of Use
Flexibility
Markup
Cleanliness
Level of Effort
Comfort Level
with HTML
Comfort Level
with PHP
Theme Template Files
Overview
1. Find the template
2. Override it in your theme
Drupal Temp Plates != Drupal templates
Image: Chris Wells (used by permission)
What are templates?
Image: https://openclipart.org/detail/17506/jigsaw-puzzle
* technically not a template file
*
Image: https://www.drupal.org/node/171194
Templates: D7 Core’s html.tpl.php
/modules/system/
Templates: Bartik’s page.tpl.php
Source: https://www.drupal.org/node/171194
/themes/bartik/templates
Templates: Custom templates
/sites/all/themes/example
templates
1. Create a templates folder
2. Copy templates into that folder
3. Customize templates
4. Flush the theme registry’s cache
Templates: Theme Debug Mode
Add this to settings.php:
...or enable / disable with drush
https://www.drupal.org/node/223440
Templates: Theme Debug Mode
https://www.drupal.org/node/223440
x = template currently being rendered
*= potential template suggestions
Templates: Common Drupal Template Suggestions
page.tpl.php
page--front.tpl.php
page--node--edit.tpl.php
page--node--nodeid.tpl.php
page--node.tpl.php
node.tpl.php
node--nodeid.tpl.php
node--type.tpl.php
field.tpl.php
field--field-name--content-type.tpl.php
field--content-type.tpl.php
field--field-name.tpl.php
field--field-type.tpl.php
taxonomy-term.tpl.php
taxonomy-term--tid.tpl.php
taxonomy-term--vocabulary.tpl.php
Survey Says… Templates!!!
Ease of Use
Flexibility
Markup
Cleanliness
Level of Effort
Comfort Level
with HTML
Comfort Level
with PHP
Views
Views: Overview
1. Views templates
2. Views UI
Views: Example
Views: Example
Views: Example
/sites/all/themes/example
templates
views
views-view-table.tpl.php
1. Create a views folder
2. Copy templates into that folder
3. Customize templates
4. Check template suggestions in
Views UI
5. Flush the theme registry’s cache
Views: Example
Views: Example
Views: Templates
views-view.tpl.php
views-view--funky--page.tpl.php
views-view--page.tpl.php
views-view--funky.tpl.php
views-view-table.tpl.php
views-view-table--page.tpl.php
views-view-table--funky--page.tpl.php
views-view-table--funky.tpl.php
views-view-field.tpl.php
views-view-field--page.tpl.php
views-view-field--funky--page.tpl.php
views-view-field--funky.tpl.php
Note: You will often also see views-view-fields.tpl.php
All views tables
Views tables that are page displays
Views tables that are in Funky view
Views tables that are page displays in Funky view
Views: Example
/sites/all/themes/example
templates
views
views-view-table.tpl.php
Views: Example
Views UI: Format ❭ Settings
Views UI: Fields ❭ Your Field
Views UI: Fields ❭ Your Field
Survey Says… Views!!!
Ease of Use
Flexibility
Markup
Cleanliness
Level of Effort
Comfort Level
with HTML
Comfort Level
with PHP
template.php
About - hooks, $vars, and oh so many options
A train station between the drupal core/module layer and the templating layer
TONS of ways to affect generated markup
Location of all theming hooks
Two main types of functions:
Preprocessing functions - Drupal render arrays
Theming functions - actual markup generation
Preprocessing Functions / Render Arrays
Theming Functions
Ok, so when should I use this?
Great for affecting global styles of smaller components
Smaller changes to markup (i.e. changing/adding css classes, etc.)
Also, the recommended way to modify certain core components
forms
menus
For larger components (pages, nodes, etc.) opportunity to clean up or modify data
prior to being passed to templating layer.
Survey Says… template.php!!!
Ease of Use
Flexibility
Markup
Cleanliness
Level of Effort
Comfort Level
with HTML
Comfort Level
with PHP
Fences Module
About - trimming fat from your field markup
The Fences module is the easiest way to lose 30 lbs of markup FAST (without ever
changing your diet or your templates!)
Provides global and per-field configurable options for limiting field wrapper markup
(both HTML elements and CSS classes)
Automatically detects single vs. multiple fields and adjusts markup accordingly
A go-to module for almost every project
Drupal Default Field Markup
Fences global overrides
ahhhh, that’s more like it.
En garde!!! Let’s get fencing.
Can be used in basically any new project
Use with caution on existing projects, css/js may expect certain markup, classes, etc.
Essentially handles a lot of the grunt work of creating custom field templates (field--
[type].tpl.php) in your theme
Excellent for managing field-specific markup
Features a long list of HTML elements to wrap your fields in (including HTML5 elements!)
Survey Says… Fences!!!
Ease of Use
Flexibility
Markup
Cleanliness
Level of Effort
Comfort Level
with HTML
Comfort Level
with PHP
Display Suite Module
About - Entity layouts be on fleek
A dozen different layouts out-of-the-box
Region-based interface (similar to blocks)
Can define different layouts/fields for different view modes (i.e. teaser, summary,
etc.)
Provides some really helpful additional options:
Option to make image fields link-able
Date formatting
Can edit the label and label position
Back to basics - control of element and CSS classes
Cleaning up our act (Just like Marky Mark!)
Display Suite Extras - Squeaky clean markup
As always, tons of customization
Custom layouts (defined in your themes)
drush ds-build “Three columns stacked” --regions=“Header, Left, Middle, Right, Footer”
Custom CSS classes
at /admin/structure/ds/classes with the extras module
Can create a “library” of custom classes which can then be assigned to regions, fields, etc.
Custom view modes
Outside of the core: Full Content, Teaser, Search Results, etc.
Works great with View (which allow you to select a View Mode)
Where to deploy Display Suite
Can be used effectively with almost any project to slim down generated markup
Ideal if clients want the ability arrange entity content themselves
Provides some basic options for altering entity rendering, which may be all you need
is many cases.
Especially great for projects where entity data is displayed in a number of different
formats
e.g. News Articles on a marketing site
Ease of Use
Flexibility
Markup
Cleanliness
Level of Effort
Comfort Level
with HTML
Comfort Level
with PHP
Survey Says… Display Suite!!!
Panels Module
About - Layouts with the greatest of ease
Re-usuable layouts that can be easily rearranged in the UI
Extremely feature rich, but requires a fair amount of know-how
Especially great for one-off pages (home, landing, or marketing campaign pages)
Allows mixing many types of content in the same layout
Nodes, Blocks, View, etc.
Three main ways to use:
Panel Nodes
Panel Nodes
Allows you to create new content types (just like an article, basic page, etc.)
Allows the addition of custom text, images, and other markup
Panel Pages
Completely outside the Drupal node architecture
Panels UI provides a nice balance of simplicity and feature-richness
Powerful tools, such as:
Contexts
Access Control
Panelized Content Types
Uses existing content types and allows layout management of the defined fields
Yeah, it’s all kinds of awesome
Sounds pretty rad, but what are the best use cases?
Not particularly helpful for “field-level” markup generation, but great alternative to
custom theme overrides for layout templating.
Great for grouping together nodes, blocks, views, etc. with related content
Has it’s own per-pane caching system, which is very performant.
Good for developers, easy for content managers
Can be defined in code for easy version control during development
Survey Says… Panels!!!
Ease of Use
Flexibility
Markup
Cleanliness
Level of Effort
Comfort Level
with HTML
Comfort Level
with PHP
Marky Mark’s Rap Up
WYSIWYG Text Editors
Theme template files (.tpl.php)
Views
template.php functions
Fences Module
Display Suite
Thank you!!!
Q & A

Más contenido relacionado

La actualidad más candente

WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsTomAuger
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5ketanraval
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5Ketan Raval
 
Wordpress workflow for an agency world
Wordpress workflow for an agency worldWordpress workflow for an agency world
Wordpress workflow for an agency worldChris Lowe
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikMario Peshev
 
PSD to a Drupal Theme (using a base theme)
PSD to a Drupal Theme (using a base theme)PSD to a Drupal Theme (using a base theme)
PSD to a Drupal Theme (using a base theme)kuydigital
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post TypesNile Flores
 
Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep diveRomain Jarraud
 
Wordcamp abq cf-cpt
Wordcamp abq cf-cptWordcamp abq cf-cpt
Wordcamp abq cf-cptmy easel
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeMediacurrent
 
WordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
WordCamp ABQ 2013: Making the leap from Designer to Designer/DeveloperWordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
WordCamp ABQ 2013: Making the leap from Designer to Designer/Developermy easel
 
Drupal Recipe
Drupal RecipeDrupal Recipe
Drupal Recipehernanibf
 
Joomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesJoomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesChris Davenport
 
WordPress HTML, CSS & Child Themes
WordPress HTML, CSS & Child ThemesWordPress HTML, CSS & Child Themes
WordPress HTML, CSS & Child ThemesMichelle Ames
 
Bootstrap Framework and Drupal
Bootstrap Framework and DrupalBootstrap Framework and Drupal
Bootstrap Framework and DrupalJim Birch
 
Towards an Alternate WordPress Theme Structure
Towards an Alternate WordPress Theme StructureTowards an Alternate WordPress Theme Structure
Towards an Alternate WordPress Theme StructureGraham Armfield
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricksaaroncouch
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoPaul Withers
 

La actualidad más candente (20)

WordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big wordsWordPress development paradigms, idiosyncrasies and other big words
WordPress development paradigms, idiosyncrasies and other big words
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Introduction to-concrete-5
Introduction to-concrete-5Introduction to-concrete-5
Introduction to-concrete-5
 
Wordpress workflow for an agency world
Wordpress workflow for an agency worldWordpress workflow for an agency world
Wordpress workflow for an agency world
 
Build a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ TelerikBuild a WordPress theme from HTML5 template @ Telerik
Build a WordPress theme from HTML5 template @ Telerik
 
Bootstrap 3 vs. bootstrap 4
Bootstrap 3 vs. bootstrap 4Bootstrap 3 vs. bootstrap 4
Bootstrap 3 vs. bootstrap 4
 
PSD to a Drupal Theme (using a base theme)
PSD to a Drupal Theme (using a base theme)PSD to a Drupal Theme (using a base theme)
PSD to a Drupal Theme (using a base theme)
 
WordPress Custom Post Types
WordPress Custom Post TypesWordPress Custom Post Types
WordPress Custom Post Types
 
Drupal 8 theming deep dive
Drupal 8 theming deep diveDrupal 8 theming deep dive
Drupal 8 theming deep dive
 
Wordcamp abq cf-cpt
Wordcamp abq cf-cptWordcamp abq cf-cpt
Wordcamp abq cf-cpt
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
 
WordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
WordCamp ABQ 2013: Making the leap from Designer to Designer/DeveloperWordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
WordCamp ABQ 2013: Making the leap from Designer to Designer/Developer
 
Drupal Recipe
Drupal RecipeDrupal Recipe
Drupal Recipe
 
Joomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic TemplatesJoomla Day UK 2009 Basic Templates
Joomla Day UK 2009 Basic Templates
 
WordPress HTML, CSS & Child Themes
WordPress HTML, CSS & Child ThemesWordPress HTML, CSS & Child Themes
WordPress HTML, CSS & Child Themes
 
Slides bootstrap-4
Slides bootstrap-4Slides bootstrap-4
Slides bootstrap-4
 
Bootstrap Framework and Drupal
Bootstrap Framework and DrupalBootstrap Framework and Drupal
Bootstrap Framework and Drupal
 
Towards an Alternate WordPress Theme Structure
Towards an Alternate WordPress Theme StructureTowards an Alternate WordPress Theme Structure
Towards an Alternate WordPress Theme Structure
 
Theming tips and tricks
Theming tips and tricksTheming tips and tricks
Theming tips and tricks
 
BP210 XPages: Enter The Dojo
BP210 XPages: Enter The DojoBP210 XPages: Enter The Dojo
BP210 XPages: Enter The Dojo
 

Destacado

Drupal Presentation @ the Higher Education Web Symposium
Drupal Presentation @ the Higher Education Web SymposiumDrupal Presentation @ the Higher Education Web Symposium
Drupal Presentation @ the Higher Education Web SymposiumZivtech, LLC
 
Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)jhamiltoorion
 
Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
Sherlock Markup and Sammy Semantic - drupal theming forensic analysisSherlock Markup and Sammy Semantic - drupal theming forensic analysis
Sherlock Markup and Sammy Semantic - drupal theming forensic analysisAndreas Sahle
 
Breaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with DrupalBreaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with DrupalAcquia
 

Destacado (6)

Drupal Presentation @ the Higher Education Web Symposium
Drupal Presentation @ the Higher Education Web SymposiumDrupal Presentation @ the Higher Education Web Symposium
Drupal Presentation @ the Higher Education Web Symposium
 
Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)Semantic Site Building (Drupal 7)
Semantic Site Building (Drupal 7)
 
Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
Sherlock Markup and Sammy Semantic - drupal theming forensic analysisSherlock Markup and Sammy Semantic - drupal theming forensic analysis
Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
 
Breaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with DrupalBreaking the Box: Pushing the Boundaries of UX with Drupal
Breaking the Box: Pushing the Boundaries of UX with Drupal
 
What Is Force
What Is ForceWhat Is Force
What Is Force
 
BEM it!
BEM it!BEM it!
BEM it!
 

Similar a Best practices for generating clean markup in Drupal

Share point 2010-uiimprovements
Share point 2010-uiimprovementsShare point 2010-uiimprovements
Share point 2010-uiimprovementsLiquidHub
 
10 steps to becoming a panels pro
10 steps to becoming a panels pro10 steps to becoming a panels pro
10 steps to becoming a panels proGreen For All
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To DrupalLauren Roth
 
Developing a Struts & Tiles application using WebSphere Studio
Developing a Struts & Tiles application using WebSphere StudioDeveloping a Struts & Tiles application using WebSphere Studio
Developing a Struts & Tiles application using WebSphere Studioelliando dias
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupalmayank.grd
 
Modernising AEM Sites Codebase (AEM Meetup 2019)
Modernising AEM Sites Codebase  (AEM Meetup 2019)Modernising AEM Sites Codebase  (AEM Meetup 2019)
Modernising AEM Sites Codebase (AEM Meetup 2019)Hanish Bansal
 
Drupal8 corporate training in Hyderabad
Drupal8 corporate training in HyderabadDrupal8 corporate training in Hyderabad
Drupal8 corporate training in Hyderabadphp2ranjan
 
CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsSuite Solutions
 
Single sourcing to the max
Single sourcing to the maxSingle sourcing to the max
Single sourcing to the maxNeil Perlin
 
Dita for the web: Make Adaptive Content Simple for Writers and Developer
Dita for the web: Make Adaptive Content Simple for Writers and DeveloperDita for the web: Make Adaptive Content Simple for Writers and Developer
Dita for the web: Make Adaptive Content Simple for Writers and DeveloperDon Day
 
Synapseindia drupal intro 0
Synapseindia drupal intro 0Synapseindia drupal intro 0
Synapseindia drupal intro 0saritasingh19866
 
Drupal - presentazione formazione sessione I
Drupal - presentazione formazione sessione IDrupal - presentazione formazione sessione I
Drupal - presentazione formazione sessione IGian Luca Matteucci
 
CMS 101 Drupal
CMS 101 DrupalCMS 101 Drupal
CMS 101 Drupalggfergu
 
SageFrame Templating
SageFrame TemplatingSageFrame Templating
SageFrame TemplatingMarshalP
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Typesheatherrumd
 

Similar a Best practices for generating clean markup in Drupal (20)

Share point 2010-uiimprovements
Share point 2010-uiimprovementsShare point 2010-uiimprovements
Share point 2010-uiimprovements
 
10 steps to becoming a panels pro
10 steps to becoming a panels pro10 steps to becoming a panels pro
10 steps to becoming a panels pro
 
The panels family
The panels familyThe panels family
The panels family
 
Introduction To Drupal
Introduction To DrupalIntroduction To Drupal
Introduction To Drupal
 
Drupal Workshop
Drupal WorkshopDrupal Workshop
Drupal Workshop
 
Drupal_cubet seminar
Drupal_cubet seminarDrupal_cubet seminar
Drupal_cubet seminar
 
Drupalcamp
DrupalcampDrupalcamp
Drupalcamp
 
Developing a Struts & Tiles application using WebSphere Studio
Developing a Struts & Tiles application using WebSphere StudioDeveloping a Struts & Tiles application using WebSphere Studio
Developing a Struts & Tiles application using WebSphere Studio
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
Modernising AEM Sites Codebase (AEM Meetup 2019)
Modernising AEM Sites Codebase  (AEM Meetup 2019)Modernising AEM Sites Codebase  (AEM Meetup 2019)
Modernising AEM Sites Codebase (AEM Meetup 2019)
 
Drupal8 corporate training in Hyderabad
Drupal8 corporate training in HyderabadDrupal8 corporate training in Hyderabad
Drupal8 corporate training in Hyderabad
 
CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputs
 
Single sourcing to the max
Single sourcing to the maxSingle sourcing to the max
Single sourcing to the max
 
Dita for the web: Make Adaptive Content Simple for Writers and Developer
Dita for the web: Make Adaptive Content Simple for Writers and DeveloperDita for the web: Make Adaptive Content Simple for Writers and Developer
Dita for the web: Make Adaptive Content Simple for Writers and Developer
 
Synapseindia drupal intro 0
Synapseindia drupal intro 0Synapseindia drupal intro 0
Synapseindia drupal intro 0
 
Drupal - presentazione formazione sessione I
Drupal - presentazione formazione sessione IDrupal - presentazione formazione sessione I
Drupal - presentazione formazione sessione I
 
CMS 101 Drupal
CMS 101 DrupalCMS 101 Drupal
CMS 101 Drupal
 
SageFrame Templating
SageFrame TemplatingSageFrame Templating
SageFrame Templating
 
Drupal Bootcamp Mcn2008
Drupal Bootcamp   Mcn2008Drupal Bootcamp   Mcn2008
Drupal Bootcamp Mcn2008
 
Creating and Theming Custom Content Types
Creating and Theming Custom Content TypesCreating and Theming Custom Content Types
Creating and Theming Custom Content Types
 

Último

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Último (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

Best practices for generating clean markup in Drupal

Notas del editor

  1. Things to consider Ease of use is the User Experience Level of effort is how long to master You comfort level with HTML, PHP
  2. Browser initiates request Web Server routes to index.php Bootstrap Drupal Map path (i.e. /posts/why-marky-mark-is-awesome) to internal path (i.e. node/14) Associated module loads content (the Node module in this case) “Middleware” can add, extend, or alter outgoing content Modules Themes Drupal passes content variables to template files (.tpl.php) for rendering Full page markup is assembled and returned to the Browser
  3. Templates generate markup. Think of them as the pieces of a puzzle that build the html that appear on Drupal pages.
  4. template.php file is not required, but can be helpful. We’ll talk more about it later, but for right now just know that it is closely tied to the .tpl.php files.
  5. Drupal 7’s core templates are found in /modules/system folder.
  6. A few notes: Drupal’s theming system will automatically detect the templates in your theme folder and load that version of the template instead of the previous one. Make sure that Drupal’s caching and CSS / JSS aggregation are turned off during development If you have a lot of templates you may want to create subfolders inside the template folders to help keep them organized
  7. Important Note: Theme debug mode does not make views template suggestions
  8. A few notes: Drupal’s theming system will automatically detect the templates in your theme folder and load that version of the template instead of the previous one. Make sure that Drupal’s caching and CSS / JSS aggregation are turned off during development If you have a lot of templates you may want to create subfolders inside the template folders to help keep them organized
  9. Minimum of two templates for every View All Views have views-view.tpl.php All Views have a style template. Ours is views-view-table Views displays also have templates
  10. In our case, we just need to add the class of table to the table tag and flush caches.
  11. Developed to allow preprocessor functions greater granularity when altering markup
  12. Our go-to is template files Source control low-overhead future friendly The one we use the least is Panels