SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
Taming Drupal Blocks
for Content Editors
Drupal Brisbane Meetup
Tuesday, 12 January 2016
Brian Hay
brian@virtualrealms.com.au
Virtual Realms Pty Ltd
www.OrbitOwl.com www.Construct3D.com
www.DrupalEnso.org
Block Admin & Client Authors.
Should.
NEVER.
Mix!
Quandary: Block Editing by Clients
● Novice clients invariably want to be able to edit EVERYTHING
that looks like content
● And blocks often contain chunks of text or markup that should
be able to be edited by clients
● But exposing clients to the block admin interface 

○ is RISKY, as sometimes site layout, styling & design
integrity rely on block position & content (inline classes &
ids etc) not changing
○ adds COMPLEXITY to the authoring experience
○ increases COSTS of training, support & maintenance
Quick demo ...
● Block admin
○ Easy to mess up layout & design
○ Yet another interface to learn
○ Lots of extraneous information
What if clients could ...
● edit every little bit of content on their site without
needing access to the block admin interface or
‘administer blocks’ permissions?
● edit everything via the familiar content overview (or
workbench) page & node edit interfaces?
● Bonus extra:
○ edit complex multipart page elements on one page?
One Solution: ‘Snippets’
Snippets are:
● Small chunks of text or markup
● That can be used within blocks and views
● Initially created by site builders
● But fully editable by novice clients in exactly the same
way as any other content
● Block content can now benefit from node revisions
Some may be using this technique already!
Another Solution: Block Access
● Block Access module
● Have not used this extensively myself
● Would suit some use cases
● However 

○ Still requires client familiarity with block admin interface
○ Doesn’t address editing of text within views headers & footers
○ ‘Snippets’ handle both cases with ease
So let’s get on with it!
Snippets: What You’ll Need
● Drupal 7 + Views
○ This ‘problem’ and proposed solution also apply to Drupal 8 but some of these modules
not yet Drupal 8 ready
● Nodeblock
○ Allows setting a content type as a block
● Custom Search (optional)
○ Exclude snippet nodes from search. Not generally a good look if they show in search
results! Note: for SEO you should also exclude from sitemaps! (not covered here)
● Exclude Node Title (optional)
○ Optionally exclude node titles. Very flexible.
● Simplify (optional)
○ Dramatically simplify the content editing experience for clients
Snippet: Basic Setup
1. Install required contrib modules
○ ‘Nodeblock’, ‘Exclude Node Title’, ‘Simplify’ & ‘Custom Search’
2. Create ‘Snippet’ content type
○ Title & Body (with no summary) fields
○ Enable Nodeblock ‘Available as block’
○ Hide extra fields using Simplify
3. Exclude ‘Snippet’ nodes from search
○ ‘Custom Search’ > ‘Content tab’ > ‘Content exclusion’
4. Setup ‘Snippet’ node title exclusion option
○ ‘Exclude Node Title’ config > ‘Snippet’ = ‘User defined nodes 
’ and check all view modes
5. Create client user, role & permissions
○ Create test user ‘client’
○ Create ‘client author’ role & assign role to user ‘client’
○ Grant permissions for ‘client author’ role:
■ ‘use contextual links’, ‘access content overview page’, ‘view published content’, view
own unpublished content’, ‘snippet: edit own content’, ‘snippet: edit any content’
Snippet: Basic Usage
1. Site builder:
○ Create a snippet node e.g. ‘About Us’ with initial placeholder content
○ Nodeblock automatically creates a new block of the same title
○ Place new ‘About Us’ block in region using block admin interface
○ Set block title to ‘<none>’ so that title comes from snippet node instead
2. Client:
○ Edit ‘About Us’ block content via contextual link or content overview page
Snippet: Views Setup
1. Create new snippet node for view header
2. Create a new view e.g. ‘Latest Headlines’ block display
○ Unformatted list of node titles filtered by ‘Articles’ & ‘Published’
3. Add header
○ ‘Entity: Rendered Entity’
○ Enter node id of previously created snippet
4. Save view
5. Add new views block ‘Latest Headlines’ to region
○ Set block title to ‘<none>’ so that title comes from snippet node instead
Now, if you apply this consistently ...
● Client should have complete editing control
over all content
● You as site builder or developer can sleep
easy knowing that there’ll be fewer problems
and questions
Bonus Extra
How to provide single page content editing for multipart
page elements like 

● Group of calls to action
● Group of buttons
● Social media follow links
● Slideshow / carousel
● Etc ...
Client editors shouldn’t have to
edit each node separately!
Two Options
There’s at least two decent options I know of:
1. Field collection
○ Popular
○ Relatively easy to setup, configure & theme
2. Inline entity form
○ More low level / technical
○ Will be used as backend for ‘field collection’ in D8
Other Lesser Options
Ordering modules:
○ Weight, Nodequeue or DraggableViews modules
○ Can create a page for client authors to change order
○ Still not ‘one-page’ editing / ordering solutions
Demo: Bring it all together
‘Follow Us’ block
● New content type
● Nodeblock so it can be used as block
● Multi-entity creation / editing / ordering on one page using field collection
● Template overrides (per collection) possible
Adds up to a faster, easier client editing experience!
Lastly ...
● Package these techniques up for easy reuse
with D8 CMI and/or D7 features!
Questions?
~ END ~
Thanks!

Mais conteĂșdo relacionado

Mais procurados

Knockout mvvm-m1-slides
Knockout mvvm-m1-slidesKnockout mvvm-m1-slides
Knockout mvvm-m1-slidesMasterCode.vn
 
How NOT to build Drupal Sites - Sai Tanay
How NOT to build Drupal Sites - Sai TanayHow NOT to build Drupal Sites - Sai Tanay
How NOT to build Drupal Sites - Sai TanayDrupal Camp Delhi
 
Building your first plugin
Building your first pluginBuilding your first plugin
Building your first pluginScott DeLuzio
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme DevelopmentJosh Williams
 
What’s great about being a web developer
What’s great about being a web developerWhat’s great about being a web developer
What’s great about being a web developerAspDotNetStorefront
 
Tech webinar: Polymer & Web Components Quick Start
Tech webinar: Polymer & Web Components Quick StartTech webinar: Polymer & Web Components Quick Start
Tech webinar: Polymer & Web Components Quick StartCodemotion
 
Basic Views
Basic ViewsBasic Views
Basic Viewsguest1365ce
 
Introduction to Knockoutjs
Introduction to KnockoutjsIntroduction to Knockoutjs
Introduction to Knockoutjsjhoguet
 

Mais procurados (8)

Knockout mvvm-m1-slides
Knockout mvvm-m1-slidesKnockout mvvm-m1-slides
Knockout mvvm-m1-slides
 
How NOT to build Drupal Sites - Sai Tanay
How NOT to build Drupal Sites - Sai TanayHow NOT to build Drupal Sites - Sai Tanay
How NOT to build Drupal Sites - Sai Tanay
 
Building your first plugin
Building your first pluginBuilding your first plugin
Building your first plugin
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme Development
 
What’s great about being a web developer
What’s great about being a web developerWhat’s great about being a web developer
What’s great about being a web developer
 
Tech webinar: Polymer & Web Components Quick Start
Tech webinar: Polymer & Web Components Quick StartTech webinar: Polymer & Web Components Quick Start
Tech webinar: Polymer & Web Components Quick Start
 
Basic Views
Basic ViewsBasic Views
Basic Views
 
Introduction to Knockoutjs
Introduction to KnockoutjsIntroduction to Knockoutjs
Introduction to Knockoutjs
 

Destaque

Gestion de proyectos de tecnologĂ­a educativa
Gestion de proyectos de tecnologĂ­a educativaGestion de proyectos de tecnologĂ­a educativa
Gestion de proyectos de tecnologĂ­a educativaDianacristancho2012
 
ëŒ€ì‹ ëŠŹíŹíŠž_ëȘšë‹ëŻžíŒ…_151002
ëŒ€ì‹ ëŠŹíŹíŠž_ëȘšë‹ëŻžíŒ…_151002ëŒ€ì‹ ëŠŹíŹíŠž_ëȘšë‹ëŻžíŒ…_151002
ëŒ€ì‹ ëŠŹíŹíŠž_ëȘšë‹ëŻžíŒ…_151002DaishinSecurities
 
Trailer exhibition research
Trailer exhibition researchTrailer exhibition research
Trailer exhibition researchGabyV45
 
Trailer title and credit conventions
Trailer title and credit conventionsTrailer title and credit conventions
Trailer title and credit conventionsJojo Williams
 
Stanley-Sean_fullCV4
Stanley-Sean_fullCV4Stanley-Sean_fullCV4
Stanley-Sean_fullCV4Sean Stanley
 
Les plantes per India i David
Les plantes per India i DavidLes plantes per India i David
Les plantes per India i Davidaprenentjunts
 
Solutionpath - HPE Discover 2015
Solutionpath - HPE Discover 2015Solutionpath - HPE Discover 2015
Solutionpath - HPE Discover 2015Gemma Wilson
 
cat 15 final outline final
cat 15 final outline finalcat 15 final outline final
cat 15 final outline finalZain Bukhari
 
PACE-IT, Security+2.7: Physical Security and Enviornmental Controls
PACE-IT, Security+2.7: Physical Security and Enviornmental ControlsPACE-IT, Security+2.7: Physical Security and Enviornmental Controls
PACE-IT, Security+2.7: Physical Security and Enviornmental ControlsPace IT at Edmonds Community College
 
Juliet_sampa_CV_ edited
Juliet_sampa_CV_ editedJuliet_sampa_CV_ edited
Juliet_sampa_CV_ editedjulietsampa
 
Les plantes per Aitana i Happy
Les plantes per Aitana i HappyLes plantes per Aitana i Happy
Les plantes per Aitana i Happyaprenentjunts
 

Destaque (13)

PACE-IT: Analyzing Monitoring Reports
PACE-IT: Analyzing Monitoring ReportsPACE-IT: Analyzing Monitoring Reports
PACE-IT: Analyzing Monitoring Reports
 
Gestion de proyectos de tecnologĂ­a educativa
Gestion de proyectos de tecnologĂ­a educativaGestion de proyectos de tecnologĂ­a educativa
Gestion de proyectos de tecnologĂ­a educativa
 
ëŒ€ì‹ ëŠŹíŹíŠž_ëȘšë‹ëŻžíŒ…_151002
ëŒ€ì‹ ëŠŹíŹíŠž_ëȘšë‹ëŻžíŒ…_151002ëŒ€ì‹ ëŠŹíŹíŠž_ëȘšë‹ëŻžíŒ…_151002
ëŒ€ì‹ ëŠŹíŹíŠž_ëȘšë‹ëŻžíŒ…_151002
 
Trailer exhibition research
Trailer exhibition researchTrailer exhibition research
Trailer exhibition research
 
Trailer title and credit conventions
Trailer title and credit conventionsTrailer title and credit conventions
Trailer title and credit conventions
 
Stanley-Sean_fullCV4
Stanley-Sean_fullCV4Stanley-Sean_fullCV4
Stanley-Sean_fullCV4
 
Les plantes per India i David
Les plantes per India i DavidLes plantes per India i David
Les plantes per India i David
 
Solutionpath - HPE Discover 2015
Solutionpath - HPE Discover 2015Solutionpath - HPE Discover 2015
Solutionpath - HPE Discover 2015
 
cat 15 final outline final
cat 15 final outline finalcat 15 final outline final
cat 15 final outline final
 
PACE-IT, Security+2.7: Physical Security and Enviornmental Controls
PACE-IT, Security+2.7: Physical Security and Enviornmental ControlsPACE-IT, Security+2.7: Physical Security and Enviornmental Controls
PACE-IT, Security+2.7: Physical Security and Enviornmental Controls
 
Juliet_sampa_CV_ edited
Juliet_sampa_CV_ editedJuliet_sampa_CV_ edited
Juliet_sampa_CV_ edited
 
Les plantes per Aitana i Happy
Les plantes per Aitana i HappyLes plantes per Aitana i Happy
Les plantes per Aitana i Happy
 
PACE-IT, Security+3.4: Summary of Wireless Attacks
PACE-IT, Security+3.4: Summary of Wireless AttacksPACE-IT, Security+3.4: Summary of Wireless Attacks
PACE-IT, Security+3.4: Summary of Wireless Attacks
 

Semelhante a Taming Drupal Blocks for Content Editors a.k.a. "Snippets"

2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec PolymerHoracio Gonzalez
 
Theme customisation for beginners
Theme customisation for beginnersTheme customisation for beginners
Theme customisation for beginnersGareth J Barnard
 
Introduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedIntroduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedImran Sayed
 
Developing Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsDeveloping Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsSteven Slack
 
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesSpeedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesAcquia
 
ENIB 2015 2016 - CAI Web S02E01- CÎté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- CÎté Navigateur 3/3 - Web Components avec Po...ENIB 2015 2016 - CAI Web S02E01- CÎté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- CÎté Navigateur 3/3 - Web Components avec Po...Horacio Gonzalez
 
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8Wong Hoi Sing Edison
 
Kentico Cloud Best Practices
Kentico Cloud Best PracticesKentico Cloud Best Practices
Kentico Cloud Best PracticesKentico Software
 
SHOW202: How to customize Lotus Quickr Templates Using HTML, Javascript and C...
SHOW202: How to customize Lotus Quickr Templates Using HTML, Javascript and C...SHOW202: How to customize Lotus Quickr Templates Using HTML, Javascript and C...
SHOW202: How to customize Lotus Quickr Templates Using HTML, Javascript and C...Brian O'Gorman
 
Html5 training
Html5 trainingHtml5 training
Html5 trainingJames VanDyke
 
Extending WordPress' TinyMCE
Extending WordPress' TinyMCEExtending WordPress' TinyMCE
Extending WordPress' TinyMCEHristo Chakarov
 
Jbake workshop (Greach 2019)
Jbake workshop (Greach 2019)Jbake workshop (Greach 2019)
Jbake workshop (Greach 2019)Mario GarcĂ­a
 
Building your first webpage
Building your first webpageBuilding your first webpage
Building your first webpageRebecca DuPont, PhD
 
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...Anson Han
 
Enhancing Design with Adaptive Content
Enhancing Design with Adaptive ContentEnhancing Design with Adaptive Content
Enhancing Design with Adaptive ContentDesign for Drupal, Boston
 
Drupal training-by-ruchiwebsolutions
Drupal training-by-ruchiwebsolutionsDrupal training-by-ruchiwebsolutions
Drupal training-by-ruchiwebsolutionsphp2ranjan
 
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...[DevDay2018] Embrace the challenge – working as a developer in Content Manage...
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...DevDay.org
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Case study: The Roman Baths - DrupalCamp Bristol Presentation
Case study: The Roman Baths - DrupalCamp Bristol PresentationCase study: The Roman Baths - DrupalCamp Bristol Presentation
Case study: The Roman Baths - DrupalCamp Bristol PresentationRick Donohoe
 

Semelhante a Taming Drupal Blocks for Content Editors a.k.a. "Snippets" (20)

2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer2014 03-25 - GDG Nantes - Web Components avec Polymer
2014 03-25 - GDG Nantes - Web Components avec Polymer
 
Theme customisation for beginners
Theme customisation for beginnersTheme customisation for beginners
Theme customisation for beginners
 
Introduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran SayedIntroduction to Gutenberg- Imran Sayed
Introduction to Gutenberg- Imran Sayed
 
Developing Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsDeveloping Custom WordPress Themes for Clients
Developing Custom WordPress Themes for Clients
 
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesSpeedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
 
ENIB 2015 2016 - CAI Web S02E01- CÎté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- CÎté Navigateur 3/3 - Web Components avec Po...ENIB 2015 2016 - CAI Web S02E01- CÎté Navigateur 3/3 - Web Components avec Po...
ENIB 2015 2016 - CAI Web S02E01- CÎté Navigateur 3/3 - Web Components avec Po...
 
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
[HKDUG] #20160626 - HKOSCon 2015 - Website DIY with Drupal 8
 
Kentico Cloud Best Practices
Kentico Cloud Best PracticesKentico Cloud Best Practices
Kentico Cloud Best Practices
 
SHOW202: How to customize Lotus Quickr Templates Using HTML, Javascript and C...
SHOW202: How to customize Lotus Quickr Templates Using HTML, Javascript and C...SHOW202: How to customize Lotus Quickr Templates Using HTML, Javascript and C...
SHOW202: How to customize Lotus Quickr Templates Using HTML, Javascript and C...
 
Html5 training
Html5 trainingHtml5 training
Html5 training
 
Extending WordPress' TinyMCE
Extending WordPress' TinyMCEExtending WordPress' TinyMCE
Extending WordPress' TinyMCE
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
 
Jbake workshop (Greach 2019)
Jbake workshop (Greach 2019)Jbake workshop (Greach 2019)
Jbake workshop (Greach 2019)
 
Building your first webpage
Building your first webpageBuilding your first webpage
Building your first webpage
 
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
Drupaldelphia 2013 Presentation- Making Your Site more Friendly to Search Eng...
 
Enhancing Design with Adaptive Content
Enhancing Design with Adaptive ContentEnhancing Design with Adaptive Content
Enhancing Design with Adaptive Content
 
Drupal training-by-ruchiwebsolutions
Drupal training-by-ruchiwebsolutionsDrupal training-by-ruchiwebsolutions
Drupal training-by-ruchiwebsolutions
 
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...[DevDay2018] Embrace the challenge – working as a developer in Content Manage...
[DevDay2018] Embrace the challenge – working as a developer in Content Manage...
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Case study: The Roman Baths - DrupalCamp Bristol Presentation
Case study: The Roman Baths - DrupalCamp Bristol PresentationCase study: The Roman Baths - DrupalCamp Bristol Presentation
Case study: The Roman Baths - DrupalCamp Bristol Presentation
 

Último

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïžcall girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïžDelhi Call girls
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïžcall girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïžDelhi Call girls
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 

Último (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïžcall girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïžcall girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
call girls in Vaishali (Ghaziabad) 🔝 >àŒ’8448380779 🔝 genuine Escort Service đŸ”âœ”ïžâœ”ïž
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Abortion Pill Prices Tembisa [(+27832195400*)] đŸ„ Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] đŸ„ Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] đŸ„ Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] đŸ„ Women's Abortion Clinic in T...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 

Taming Drupal Blocks for Content Editors a.k.a. "Snippets"

  • 1. Taming Drupal Blocks for Content Editors Drupal Brisbane Meetup Tuesday, 12 January 2016 Brian Hay brian@virtualrealms.com.au
  • 2. Virtual Realms Pty Ltd www.OrbitOwl.com www.Construct3D.com www.DrupalEnso.org
  • 3. Block Admin & Client Authors. Should. NEVER. Mix!
  • 4. Quandary: Block Editing by Clients ● Novice clients invariably want to be able to edit EVERYTHING that looks like content ● And blocks often contain chunks of text or markup that should be able to be edited by clients ● But exposing clients to the block admin interface 
 ○ is RISKY, as sometimes site layout, styling & design integrity rely on block position & content (inline classes & ids etc) not changing ○ adds COMPLEXITY to the authoring experience ○ increases COSTS of training, support & maintenance
  • 5. Quick demo ... ● Block admin ○ Easy to mess up layout & design ○ Yet another interface to learn ○ Lots of extraneous information
  • 6. What if clients could ... ● edit every little bit of content on their site without needing access to the block admin interface or ‘administer blocks’ permissions? ● edit everything via the familiar content overview (or workbench) page & node edit interfaces? ● Bonus extra: ○ edit complex multipart page elements on one page?
  • 7. One Solution: ‘Snippets’ Snippets are: ● Small chunks of text or markup ● That can be used within blocks and views ● Initially created by site builders ● But fully editable by novice clients in exactly the same way as any other content ● Block content can now benefit from node revisions Some may be using this technique already!
  • 8. Another Solution: Block Access ● Block Access module ● Have not used this extensively myself ● Would suit some use cases ● However 
 ○ Still requires client familiarity with block admin interface ○ Doesn’t address editing of text within views headers & footers ○ ‘Snippets’ handle both cases with ease So let’s get on with it!
  • 9. Snippets: What You’ll Need ● Drupal 7 + Views ○ This ‘problem’ and proposed solution also apply to Drupal 8 but some of these modules not yet Drupal 8 ready ● Nodeblock ○ Allows setting a content type as a block ● Custom Search (optional) ○ Exclude snippet nodes from search. Not generally a good look if they show in search results! Note: for SEO you should also exclude from sitemaps! (not covered here) ● Exclude Node Title (optional) ○ Optionally exclude node titles. Very flexible. ● Simplify (optional) ○ Dramatically simplify the content editing experience for clients
  • 10. Snippet: Basic Setup 1. Install required contrib modules ○ ‘Nodeblock’, ‘Exclude Node Title’, ‘Simplify’ & ‘Custom Search’ 2. Create ‘Snippet’ content type ○ Title & Body (with no summary) fields ○ Enable Nodeblock ‘Available as block’ ○ Hide extra fields using Simplify 3. Exclude ‘Snippet’ nodes from search ○ ‘Custom Search’ > ‘Content tab’ > ‘Content exclusion’ 4. Setup ‘Snippet’ node title exclusion option ○ ‘Exclude Node Title’ config > ‘Snippet’ = ‘User defined nodes 
’ and check all view modes 5. Create client user, role & permissions ○ Create test user ‘client’ ○ Create ‘client author’ role & assign role to user ‘client’ ○ Grant permissions for ‘client author’ role: ■ ‘use contextual links’, ‘access content overview page’, ‘view published content’, view own unpublished content’, ‘snippet: edit own content’, ‘snippet: edit any content’
  • 11. Snippet: Basic Usage 1. Site builder: ○ Create a snippet node e.g. ‘About Us’ with initial placeholder content ○ Nodeblock automatically creates a new block of the same title ○ Place new ‘About Us’ block in region using block admin interface ○ Set block title to ‘<none>’ so that title comes from snippet node instead 2. Client: ○ Edit ‘About Us’ block content via contextual link or content overview page
  • 12. Snippet: Views Setup 1. Create new snippet node for view header 2. Create a new view e.g. ‘Latest Headlines’ block display ○ Unformatted list of node titles filtered by ‘Articles’ & ‘Published’ 3. Add header ○ ‘Entity: Rendered Entity’ ○ Enter node id of previously created snippet 4. Save view 5. Add new views block ‘Latest Headlines’ to region ○ Set block title to ‘<none>’ so that title comes from snippet node instead
  • 13. Now, if you apply this consistently ... ● Client should have complete editing control over all content ● You as site builder or developer can sleep easy knowing that there’ll be fewer problems and questions
  • 14. Bonus Extra How to provide single page content editing for multipart page elements like 
 ● Group of calls to action ● Group of buttons ● Social media follow links ● Slideshow / carousel ● Etc ... Client editors shouldn’t have to edit each node separately!
  • 15. Two Options There’s at least two decent options I know of: 1. Field collection ○ Popular ○ Relatively easy to setup, configure & theme 2. Inline entity form ○ More low level / technical ○ Will be used as backend for ‘field collection’ in D8
  • 16. Other Lesser Options Ordering modules: ○ Weight, Nodequeue or DraggableViews modules ○ Can create a page for client authors to change order ○ Still not ‘one-page’ editing / ordering solutions
  • 17. Demo: Bring it all together ‘Follow Us’ block ● New content type ● Nodeblock so it can be used as block ● Multi-entity creation / editing / ordering on one page using field collection ● Template overrides (per collection) possible Adds up to a faster, easier client editing experience!
  • 18. Lastly ... ● Package these techniques up for easy reuse with D8 CMI and/or D7 features!