SlideShare a Scribd company logo
1 of 29
WHO IS THIS GUY?
• @iztok
www.twitter.com/iztok
• Drupal site builder, themer
and developer
• Passion about UX and design
• Drupal consultant
www.iztoksmolic.com
• Manager at Agile Drop
www.agiledrop.com
• Drupal Slovenia Association
organizing meetups in Ljubljana
THE COMMON WRONG DISPOSITIONS
• I know MySQL/PHP, I know Drupal
• There is a module for anything like in Joomla/Wordpress
• Drupal has a long and steep learning curve
After 5 years I am here.
1. NOT KNOWING THE FURNITURE
Designer must be
aware of the
common elements.
Check this blog post
from Chapter Three
2. OVER-DESIGNING FORMS
• HTML markup is predefined for form
• altering markup requires development skills
Solution
• Style forms: http://drupal.org/project/uniform
• Group
fields: http://drupal.org/project/field_group
• Add element (and wrappers) with
hook_form_alter
3. BAD CONTENT ARCHITECTURE DECISIONS
• using too much content types
(e.g. is Article really so different from Public release? Maybe
we can use category to separate them)
• not using node types
(e.g. instead of listing staff as a table in the Page body,
maybe build the page with Views and content type Staff
member)
No real formula, just practice and experiences.
4. WRONG FOLDER STRUCTURE
If using single site installation (one Drupal core, one
website) put:
• themes in /sites/default/themes
• modules from drupal.org in /sites/default/modules/contrib
• custom modules in /sites/default/modules/custom
Do not put themes and modules in the folder on the root
level.
Never. You can use all folder instead of default – your call.
More about this: http://drupal.org/node/120641
5. CHOOSING UNSUPPORTED MODULE
• Check the usage/download counter, last update, open
issues counter, all that can give a idea about the module
status.
• Read the description, in many cases authors let the
people know that module will be deprecated in favor of
some other more comprehensive module.
6. ORPHANED MODULES
• Clean your environment, or even better, test modules on
other installations!
• Leaving old, unused modules can confuse you latter on,
not to mention other developers.
7. USING DEFAULT BLOCKS SYSTEM
Use default blocks system
only if project is very very
simple.
A couple of attempts were
made to improve block
system, I bet on the
following two:
• Context, which is block
system on steroids
• Panels, introduces new
block-like concept
8. PUTTING CONTENT/CODE IN BLOCKS
Default blocks allow user generated content, but you can't set permissions
for editing different blocks
• Bean, you can add fields to different blocks types, which have separate
permissions (like content types do)
• Boxes, blocks with a unique machine names
9. HACKING CORE/CONTRIB THEME
if you decided to use a theme from core or from drupal.org,
there is no need to go and edit its code. Make a sub-
theme
• more about creating sub-
theme: http://drupal.org/node/225125
10. USING PAGE TEMPLATES FOR EACH SUB PAGE
Try to omit page--xxx-tpl.php templates. It duplicates the
code, and makes maintenance difficult.
Try using Context Layout or Panels if variations are really
needed.
Panels have dragable user
interface system and a
layout generator tool.
No code needed!
11. LOGIC IN TEMPLATES
SQL queries and calculations don't belong to the template
layer. If logic is not so advance it can be placed in the
preprocess function in template.php file.
• About process &
preprocess: http://drupal.org/node/223430
12. USING TOO COMMON CSS TARGETING
Drupal outputs a LOT of markup with specific HTML classes
and ids. Knowing which class is appropriate to target is
the key.
• Ids are usually unique identifiers for blocks/nodes/views
• views have classes with view name and display name
seperated. Don’t target displays (e.g. .views-display-id-
block)
• .items-list, .content, .view-content etc. are used all over
your Drupal site, don’t use for specific targeting.
13. NOT USING THE BASIC DRUPAL FUNCTIONS
Drupal comes with some very handy functions, we should
use them
- l() and url() - in contrast of hardcoded relative URL address
can outputs aliased URL path
- base_path(), returns base URL of the Drupal installation
- theme() functions like theme('image_style',array()) to out
put styled image
14. CODING
There is a 80% possibility that what you want to build can be
build with a combination of modules.
Usual suspects:
• Views (your UI for SQL queries)
• views_field_view, views_bulk_operations
• Rules (executing commands on events)
• Panels (overriding default paths like node/%nid)
• Filed collection (join fields into one field)
15. HACKING CORE AND CONTRIB MODULES
Fixing code directly in the module files makes the website
impossible to update. Instead Drupal provides hooks and
preprocess functions.
• More about hooks:
http://api.drupal.org/api/drupal/includes!module.inc/group
/hooks/7
16. NOT USING API FUNCTIONS
• Database API, dynamic queries:
http://drupal.org/node/310075
• Entity query API: http://drupal.org/node/1343708
Bets to learn from examples:
http://drupal.org/project/examples
17. NOT KNOWING HOW TO DEBUG
When you would usually use print_r() to get the content of a array
or object to your browser, Drupal has Devel
(http://drupal.org/project/devel):
• dpm($variable) – prints content of variable in human friendly
way
You can also store info to a log: http://drupal.org/project/object_log
Can’t find the right template?
Use Devel Themer (http://drupal.org/project/devel_themer)
18. NOT RESPECTING THE CODING STANDARDS
Different approaches and coding styles make code less
organized and makes the job for other developers mode
difficult.
• two spaces indentation
• $var = foo($bar, $baz, $quux);
• $some_array = array('hello', 'world', 'foo' => 'bar');
• <?php print $title; ?>
19. FORGETTING ABOUT BACK-END UX
Drupal is criticized for having a bad user experience for end
users.
I argue that with the argument that since Drupal is a
framework, back end should be part of out efforts when
building a website.
20. FORGETTING ABOUT YOU DRUPAL WEBSITE
Drupal needs love even after you have finished your website. Keeping core
and modules updates makes it easier to upgrade at some time and
keeps the system safe.
• Read books
• Get a mentor
• Fail & learn
from it

More Related Content

What's hot

Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal BasicsJuha Niemi
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For DummiesKoen Delvaux
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupalmayank.grd
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupalmayank.grd
 
Complex Content Structures and Workflow with Drupal
Complex Content Structures and Workflow with DrupalComplex Content Structures and Workflow with Drupal
Complex Content Structures and Workflow with DrupalBalance Interactive
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsMicky Metts
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHPhernanibf
 
Drupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using DrupalDrupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using DrupalVibrant Technologies & Computers
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupalsdmaxey
 
What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8Suzanne Dergacheva
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Ivan Zugec
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSuzanne Dergacheva
 
Drupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon BarcelonaDrupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon Barcelonahernanibf
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationMelanie Archer
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualSuzanne Dergacheva
 
Intro to drupal
Intro to drupalIntro to drupal
Intro to drupalhernanibf
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Exove
 

What's hot (20)

Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal Basics
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For Dummies
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupal
 
Complex Content Structures and Workflow with Drupal
Complex Content Structures and Workflow with DrupalComplex Content Structures and Workflow with Drupal
Complex Content Structures and Workflow with Drupal
 
Beginners Guide to Drupal
Beginners Guide to DrupalBeginners Guide to Drupal
Beginners Guide to Drupal
 
Drupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal ConceptsDrupal 7x Installation - Introduction to Drupal Concepts
Drupal 7x Installation - Introduction to Drupal Concepts
 
Deployer - Deployment tool for PHP
Deployer - Deployment tool for PHPDeployer - Deployment tool for PHP
Deployer - Deployment tool for PHP
 
Drupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using DrupalDrupal - Introduction to Building Library Web Site Using Drupal
Drupal - Introduction to Building Library Web Site Using Drupal
 
Introduction to Drupal
Introduction to DrupalIntroduction to Drupal
Introduction to Drupal
 
Drupal
DrupalDrupal
Drupal
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
 
What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8What is Drupal? An Introduction to Drupal 8
What is Drupal? An Introduction to Drupal 8
 
Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7Using Bootstrap in Drupal 7
Using Bootstrap in Drupal 7
 
Site Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp OttawaSite Building Checklist DrupalCamp Ottawa
Site Building Checklist DrupalCamp Ottawa
 
Drupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon BarcelonaDrupal architectures for flexible content - Drupalcon Barcelona
Drupal architectures for flexible content - Drupalcon Barcelona
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundation
 
The Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 MultilingualThe Wonderful World of Drupal 8 Multilingual
The Wonderful World of Drupal 8 Multilingual
 
Intro to drupal
Intro to drupalIntro to drupal
Intro to drupal
 
Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8Creating Landing Pages for Drupal 8
Creating Landing Pages for Drupal 8
 

Viewers also liked

Top 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeTop 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeIztok Smolic
 
Web Mapping with Drupal
Web Mapping with DrupalWeb Mapping with Drupal
Web Mapping with DrupalRanel Padon
 
Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsIztok Smolic
 
Fields in Core: How to create a custom field
Fields in Core: How to create a custom fieldFields in Core: How to create a custom field
Fields in Core: How to create a custom fieldIvan Zugec
 
Prezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnejPrezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnejbulinek
 
Attacking Drupal
Attacking DrupalAttacking Drupal
Attacking DrupalGreg Foss
 
Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8Iztok Smolic
 
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarCreating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarSuzanne Dergacheva
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinSuzanne Dergacheva
 
Drupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningDrupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningAcquia
 
Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)Sergiu Savva
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Developmentjcarrig
 

Viewers also liked (14)

Top 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies makeTop 20 Drupal Mistakes newbies make
Top 20 Drupal Mistakes newbies make
 
Web Mapping with Drupal
Web Mapping with DrupalWeb Mapping with Drupal
Web Mapping with Drupal
 
20130417124022809
2013041712402280920130417124022809
20130417124022809
 
Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 months
 
Fields in Core: How to create a custom field
Fields in Core: How to create a custom fieldFields in Core: How to create a custom field
Fields in Core: How to create a custom field
 
Prezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnejPrezentacja komunikacji niewerbalnej
Prezentacja komunikacji niewerbalnej
 
Attacking Drupal
Attacking DrupalAttacking Drupal
Attacking Drupal
 
Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8Drupal commerce 2.x for Drupal 8
Drupal commerce 2.x for Drupal 8
 
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - WebinarCreating Dynamic Landing Pages for Drupal with Panels - Webinar
Creating Dynamic Landing Pages for Drupal with Panels - Webinar
 
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon DublinCreating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
Creating Layouts and Landing Pages for Drupal 8 - DrupalCon Dublin
 
Drupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of LightningDrupal 8 Quick Start: An Overview of Lightning
Drupal 8 Quick Start: An Overview of Lightning
 
Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)Best practices in Drupal 7 (Views, Panels ...)
Best practices in Drupal 7 (Views, Panels ...)
 
5 Important Tools for Drupal Development
5 Important Tools for Drupal Development5 Important Tools for Drupal Development
5 Important Tools for Drupal Development
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similar to Top 20 mistakes you will make on your 1st Drupal project

Drupal module development
Drupal module developmentDrupal module development
Drupal module developmentRachit Gupta
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 moduletedbow
 
Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!Adelle Frank
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Anil Sagar
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with DrupalRob Sawyer
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueAlexandre Israël
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Acquia
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Angela Byron
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an OverviewMatt Weaver
 
Intro to Drupal Module Developement
Intro to Drupal Module DevelopementIntro to Drupal Module Developement
Intro to Drupal Module DevelopementMatt Mendonca
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDavid Lanier
 
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
 
Drupal training-1-in-mumbai
Drupal training-1-in-mumbaiDrupal training-1-in-mumbai
Drupal training-1-in-mumbaivibrantuser
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp Londonhernanibf
 

Similar to Top 20 mistakes you will make on your 1st Drupal project (20)

Drupal module development
Drupal module developmentDrupal module development
Drupal module development
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
 
Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!Securing Drupal 7: Do not get Hacked or Spammed to death!
Securing Drupal 7: Do not get Hacked or Spammed to death!
 
Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2Blisstering drupal module development ppt v1.2
Blisstering drupal module development ppt v1.2
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with Drupal
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
The Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices CatalogueThe Drupal 7 Worst Practices Catalogue
The Drupal 7 Worst Practices Catalogue
 
Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8Everything You Need to Know About the Top Changes in Drupal 8
Everything You Need to Know About the Top Changes in Drupal 8
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs Drupal Skils Lab 302Labs
Drupal Skils Lab 302Labs
 
Drupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating ModulesDrupal - Introduction to Drupal Creating Modules
Drupal - Introduction to Drupal Creating Modules
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
Intro to Drupal Module Developement
Intro to Drupal Module DevelopementIntro to Drupal Module Developement
Intro to Drupal Module Developement
 
Using Features
Using FeaturesUsing Features
Using Features
 
Drupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 versionDrupal upgrades and migrations. BAD Camp 2013 version
Drupal upgrades and migrations. BAD Camp 2013 version
 
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...
 
72d5drupal
72d5drupal72d5drupal
72d5drupal
 
Drupal training-1-in-mumbai
Drupal training-1-in-mumbaiDrupal training-1-in-mumbai
Drupal training-1-in-mumbai
 
Drupal
DrupalDrupal
Drupal
 
One Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp LondonOne Drupal to rule them all - Drupalcamp London
One Drupal to rule them all - Drupalcamp London
 

Recently uploaded

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 

Recently uploaded (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

Top 20 mistakes you will make on your 1st Drupal project

  • 1.
  • 2. WHO IS THIS GUY? • @iztok www.twitter.com/iztok • Drupal site builder, themer and developer • Passion about UX and design • Drupal consultant www.iztoksmolic.com • Manager at Agile Drop www.agiledrop.com • Drupal Slovenia Association organizing meetups in Ljubljana
  • 3. THE COMMON WRONG DISPOSITIONS • I know MySQL/PHP, I know Drupal • There is a module for anything like in Joomla/Wordpress • Drupal has a long and steep learning curve After 5 years I am here.
  • 4.
  • 5. 1. NOT KNOWING THE FURNITURE Designer must be aware of the common elements. Check this blog post from Chapter Three
  • 6. 2. OVER-DESIGNING FORMS • HTML markup is predefined for form • altering markup requires development skills Solution • Style forms: http://drupal.org/project/uniform • Group fields: http://drupal.org/project/field_group • Add element (and wrappers) with hook_form_alter
  • 7. 3. BAD CONTENT ARCHITECTURE DECISIONS • using too much content types (e.g. is Article really so different from Public release? Maybe we can use category to separate them) • not using node types (e.g. instead of listing staff as a table in the Page body, maybe build the page with Views and content type Staff member) No real formula, just practice and experiences.
  • 8.
  • 9. 4. WRONG FOLDER STRUCTURE If using single site installation (one Drupal core, one website) put: • themes in /sites/default/themes • modules from drupal.org in /sites/default/modules/contrib • custom modules in /sites/default/modules/custom Do not put themes and modules in the folder on the root level. Never. You can use all folder instead of default – your call. More about this: http://drupal.org/node/120641
  • 10. 5. CHOOSING UNSUPPORTED MODULE • Check the usage/download counter, last update, open issues counter, all that can give a idea about the module status. • Read the description, in many cases authors let the people know that module will be deprecated in favor of some other more comprehensive module.
  • 11. 6. ORPHANED MODULES • Clean your environment, or even better, test modules on other installations! • Leaving old, unused modules can confuse you latter on, not to mention other developers.
  • 12. 7. USING DEFAULT BLOCKS SYSTEM Use default blocks system only if project is very very simple. A couple of attempts were made to improve block system, I bet on the following two: • Context, which is block system on steroids • Panels, introduces new block-like concept
  • 13. 8. PUTTING CONTENT/CODE IN BLOCKS Default blocks allow user generated content, but you can't set permissions for editing different blocks • Bean, you can add fields to different blocks types, which have separate permissions (like content types do) • Boxes, blocks with a unique machine names
  • 14.
  • 15. 9. HACKING CORE/CONTRIB THEME if you decided to use a theme from core or from drupal.org, there is no need to go and edit its code. Make a sub- theme • more about creating sub- theme: http://drupal.org/node/225125
  • 16. 10. USING PAGE TEMPLATES FOR EACH SUB PAGE Try to omit page--xxx-tpl.php templates. It duplicates the code, and makes maintenance difficult. Try using Context Layout or Panels if variations are really needed. Panels have dragable user interface system and a layout generator tool. No code needed!
  • 17. 11. LOGIC IN TEMPLATES SQL queries and calculations don't belong to the template layer. If logic is not so advance it can be placed in the preprocess function in template.php file. • About process & preprocess: http://drupal.org/node/223430
  • 18. 12. USING TOO COMMON CSS TARGETING Drupal outputs a LOT of markup with specific HTML classes and ids. Knowing which class is appropriate to target is the key. • Ids are usually unique identifiers for blocks/nodes/views • views have classes with view name and display name seperated. Don’t target displays (e.g. .views-display-id- block) • .items-list, .content, .view-content etc. are used all over your Drupal site, don’t use for specific targeting.
  • 19. 13. NOT USING THE BASIC DRUPAL FUNCTIONS Drupal comes with some very handy functions, we should use them - l() and url() - in contrast of hardcoded relative URL address can outputs aliased URL path - base_path(), returns base URL of the Drupal installation - theme() functions like theme('image_style',array()) to out put styled image
  • 20.
  • 21. 14. CODING There is a 80% possibility that what you want to build can be build with a combination of modules. Usual suspects: • Views (your UI for SQL queries) • views_field_view, views_bulk_operations • Rules (executing commands on events) • Panels (overriding default paths like node/%nid) • Filed collection (join fields into one field)
  • 22. 15. HACKING CORE AND CONTRIB MODULES Fixing code directly in the module files makes the website impossible to update. Instead Drupal provides hooks and preprocess functions. • More about hooks: http://api.drupal.org/api/drupal/includes!module.inc/group /hooks/7
  • 23. 16. NOT USING API FUNCTIONS • Database API, dynamic queries: http://drupal.org/node/310075 • Entity query API: http://drupal.org/node/1343708 Bets to learn from examples: http://drupal.org/project/examples
  • 24. 17. NOT KNOWING HOW TO DEBUG When you would usually use print_r() to get the content of a array or object to your browser, Drupal has Devel (http://drupal.org/project/devel): • dpm($variable) – prints content of variable in human friendly way You can also store info to a log: http://drupal.org/project/object_log Can’t find the right template? Use Devel Themer (http://drupal.org/project/devel_themer)
  • 25. 18. NOT RESPECTING THE CODING STANDARDS Different approaches and coding styles make code less organized and makes the job for other developers mode difficult. • two spaces indentation • $var = foo($bar, $baz, $quux); • $some_array = array('hello', 'world', 'foo' => 'bar'); • <?php print $title; ?>
  • 26.
  • 27. 19. FORGETTING ABOUT BACK-END UX Drupal is criticized for having a bad user experience for end users. I argue that with the argument that since Drupal is a framework, back end should be part of out efforts when building a website.
  • 28. 20. FORGETTING ABOUT YOU DRUPAL WEBSITE Drupal needs love even after you have finished your website. Keeping core and modules updates makes it easier to upgrade at some time and keeps the system safe.
  • 29. • Read books • Get a mentor • Fail & learn from it

Editor's Notes

  1. I know MySQL/PHP, I know Drupal I confess that I still suck at PHP, but I can still build an advance Drupal project (even coding with Drupal “API”) There is a module for anything like in Joomla/Wordpress Drupal modules rarely bring full features like Image gallery or Slideshow, but together with Field UI, Views, Views Slideshow and Colorbox you can build a Slideshow video gallery. Drupal has a long and steep learning curve 5 years ago I was designing posters and now I help senior PHP developers understand Drupal.