SlideShare a Scribd company logo
Introduction to Drupal 7

                                 Session 2.2
                           Content types and fields



Drupalist: Kalin Chernev          Course by Init Lab (http://initlab.org)   1
Agenda
•    What is a content type
•    Content type settings
•    Fields
•    Popular contributed modules




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   2
What is a content type
• Simply: the most powerful Drupal feature
• By default: 2 content types:
       – Basic page
       – Article
• Unlimited number of custom content types
• Many types of fields, no limitations on the
  number of them


Drupalist: Kalin Chernev    Course by Init Lab (http://initlab.org)   3
Content type settings
•    Name and description fields
•    Submission form settings
•    Publishing options
•    Display settings for meta data
•    Comments settings
•    Menu settings
•    Other – when additional modules are enabled

Drupalist: Kalin Chernev        Course by Init Lab (http://initlab.org)   4
Creating new content type
• Administration > Structure > Content types
• URL: ../admin/structure/types




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   5
Adding news content type example




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   6
Fields management
• Administration > Structure > Content types
• {The content type} > manage fields




Drupalist: Kalin Chernev       Course by Init Lab (http://initlab.org)   7
Manage Fields vs Manage Displays
• Manage fields
       – Adding new fields
       – Removing fields
       – Grouping fields (with additional module)
•    Order of the fields
•    Setting labels display
•    Setting fields contents display
•    Again, grouping fields in groups (with additional
     module)

Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   8
Adding a date field to news
• Download/Install Date module
• Enable “Date”, “Date API” and “Date Popup”
• Go to
  admin/structure/types/manage/news/fields
• Add a new field:
       – Label: Original publish date
       – Field type: Date
       – Machine readable: “orig_pub_date”
       – Widget type: Pop-up calendar
Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   9
The date field
• Field settings:
       – Date attributes to collect: leave it as it is, the
         granularity is good to be by minutes
       – Collect an end date: leave it as it is, we don’t need
         to collect end date value
       – Time zone handling: set to “No time zone
         conversion”
       – Cache dates: leave it as it is, we don’t need
         caching for now

Drupalist: Kalin Chernev    Course by Init Lab (http://initlab.org)   10
Advanced date field settings
• Required field: yes, we want to make sure the user has
  filled in a value here
• Date entry options: set it as you prefer the format to
  be
• Starting year: -0 years from now: we don’t really need
  more time back
• Ending year: +0 years from now: we don’t need more
  time ahead as well
• Default date: set it to “Now” as we want the field to
  take current time by default
• Number of values: set it to “1”, as we need only 1
  value
Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   11
Adding the date field




Drupalist: Kalin Chernev        Course by Init Lab (http://initlab.org)   12
System date settings

 Reports will notify you for required date settings. Some recommended options:




Drupalist: Kalin Chernev        Course by Init Lab (http://initlab.org)          13
Adding an image field




Drupalist: Kalin Chernev        Course by Init Lab (http://initlab.org)   14
Image field settings
• Allowed file extensions: the extensions the user can upload in the field:
  jpg, png, etc
• File directory: used rarely, only if you want the field to store images in
  specific folder which is not the sites/default/files folder
• Maximum and minimum image resolutions: used rarely, only if you want
  to limit the input dimensions of the images
• Maximum upload size: this is the limitation you can set on the physical
  size of the files
• Enabling Alt and Title: good to have if the administrator/editor has some
  SEO knowledge to populate these meta data
• Preview image style: options come from Image style module. The size you
  specify here is only for the back-end work of the admin
• Number of values: from 1 to unlimited, depending on the case
• Default image: rarely used, only if a feature or section requires an image,
  you can set one default to be displayed when the admin does not upload
  one

Drupalist: Kalin Chernev       Course by Init Lab (http://initlab.org)      15
Adding tags field
• You can use the default existing Tags vocabulary field
• Use the ”Autocomplete term widget (tagging)” widget type
• Save and create with default settings




Drupalist: Kalin Chernev      Course by Init Lab (http://initlab.org)   16
Adding tags field
• You can either use and existing Category vocabulary field or
  create one (if the first one is not available) (1st screenshot)
• Use the ”Select list” widget type as you want the Category
  field to be a list of values, only 1 of which can be selected
• Set the number of values to be 1, in the Category field settings
  (second screenshot)




Drupalist: Kalin Chernev      Course by Init Lab (http://initlab.org)   17
Compiling news content type feature
• We can export our News content type
  configurations into code for better versioning
• Make sure you have the Features module
  enabled and go to Administer > Structure >
  Features > Create new
• Name and description of the feature are arbitrary
  – anyway aim to specify them logically enough
  you can remind yourself what the feature is
  about
• You can start with 7.x-1.0 for the version
Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   18
News content type feature
• Select “News” content type from the node
  bundle components options
• Select all fields related to the news content
  type from the Fields component: all that start
  with “node-news-…”
• Download the feature
• Place the feature in your modules directory
  and enable it

Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   19
News content type feature




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   20
Enabling the News content type
• Administration > Structure > Features




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   21
Popular contributed modules
• Date – for date type fields
• Field Group – grouping multiple fields in a fieldset
  with various options of output
• Link – having options for attributes
• Email – including validations
• Field permissions – for settings permissions on a
  field-by field level
• Media – different media handling
• References – referencing nodes and users

Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   22
Time for questions




Drupalist: Kalin Chernev       Course by Init Lab (http://initlab.org)   23
Contacts
Kalin Chernev
       – E: kalata@shtrak.eu
       – T: twitter.com/kalinchernev
       – U: http://shtrak.eu/kalata




Drupalist: Kalin Chernev   Course by Init Lab (http://initlab.org)   24

More Related Content

What's hot

Collections and its types in C# (with examples)
Collections and its types in C# (with examples)Collections and its types in C# (with examples)
Collections and its types in C# (with examples)
Aijaz Ali Abro
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
WebStackAcademy
 
django
djangodjango
Heap Dump Analysis - AEM: Real World Issues
Heap Dump Analysis - AEM: Real World IssuesHeap Dump Analysis - AEM: Real World Issues
Heap Dump Analysis - AEM: Real World Issues
Kanika Gera
 
Python - object oriented
Python - object orientedPython - object oriented
Python - object oriented
Learnbay Datascience
 
Basics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdfBasics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdf
Knoldus Inc.
 
React js
React jsReact js
React.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOMReact.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOM
Jimit Shah
 
5 collection framework
5 collection framework5 collection framework
5 collection framework
Minal Maniar
 
Linked Data Technology and Status
Linked Data Technology and StatusLinked Data Technology and Status
Linked Data Technology and StatusMyungjin Lee
 
React hooks
React hooksReact hooks
React hooks
Sadhna Rana
 
LINQ in C#
LINQ in C#LINQ in C#
LINQ in C#
Basant Medhat
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
Hassan Dar
 
Java collections notes
Java collections notesJava collections notes
Java collections notes
Surendar Meesala
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
kumar gaurav
 
Java collection
Java collectionJava collection
Java collection
Arati Gadgil
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
Sunny Sharma
 
TypeScript
TypeScriptTypeScript
Sql lite android
Sql lite androidSql lite android
Sql lite android
Dushyant Nasit
 

What's hot (20)

Collections and its types in C# (with examples)
Collections and its types in C# (with examples)Collections and its types in C# (with examples)
Collections and its types in C# (with examples)
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
 
django
djangodjango
django
 
Heap Dump Analysis - AEM: Real World Issues
Heap Dump Analysis - AEM: Real World IssuesHeap Dump Analysis - AEM: Real World Issues
Heap Dump Analysis - AEM: Real World Issues
 
Python - object oriented
Python - object orientedPython - object oriented
Python - object oriented
 
Introduction to java and oop
Introduction to java and oopIntroduction to java and oop
Introduction to java and oop
 
Basics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdfBasics of React Hooks.pptx.pdf
Basics of React Hooks.pptx.pdf
 
React js
React jsReact js
React js
 
React.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOMReact.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOM
 
5 collection framework
5 collection framework5 collection framework
5 collection framework
 
Linked Data Technology and Status
Linked Data Technology and StatusLinked Data Technology and Status
Linked Data Technology and Status
 
React hooks
React hooksReact hooks
React hooks
 
LINQ in C#
LINQ in C#LINQ in C#
LINQ in C#
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
Java collections notes
Java collections notesJava collections notes
Java collections notes
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
 
Java collection
Java collectionJava collection
Java collection
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Sql lite android
Sql lite androidSql lite android
Sql lite android
 

Similar to Introduction to Drupal 7 - Content types and fields

Introduction to Drupal 7 News section and home page block with views
Introduction to Drupal 7  News section and home page block with viewsIntroduction to Drupal 7  News section and home page block with views
Introduction to Drupal 7 News section and home page block with views
Kalin Chernev
 
Introduction to Drupal 7 - Updating core, themes and modules. applying patches
Introduction to Drupal 7 - Updating core, themes and modules. applying patchesIntroduction to Drupal 7 - Updating core, themes and modules. applying patches
Introduction to Drupal 7 - Updating core, themes and modules. applying patches
Kalin Chernev
 
Introduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content managementIntroduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content management
Kalin Chernev
 
Introduction to Drupal 7 - Blocks management and contexts
Introduction to Drupal 7 - Blocks management and contextsIntroduction to Drupal 7 - Blocks management and contexts
Introduction to Drupal 7 - Blocks management and contexts
Kalin Chernev
 
Introduction to Drupal 7 - Panels
Introduction to Drupal 7 - PanelsIntroduction to Drupal 7 - Panels
Introduction to Drupal 7 - Panels
Kalin Chernev
 
Introduction to Drupal 7 - Taxonomy Categorization - Homework included
Introduction to Drupal 7 - Taxonomy Categorization - Homework includedIntroduction to Drupal 7 - Taxonomy Categorization - Homework included
Introduction to Drupal 7 - Taxonomy Categorization - Homework included
Kalin Chernev
 
Introduction to Drupal 7 - Webforms
Introduction to Drupal 7 - WebformsIntroduction to Drupal 7 - Webforms
Introduction to Drupal 7 - Webforms
Kalin Chernev
 
Introduction to Drupal 7 Users and roles management
Introduction to Drupal 7 Users and roles managementIntroduction to Drupal 7 Users and roles management
Introduction to Drupal 7 Users and roles management
Kalin Chernev
 
Introduction to Drupal 7 - Getting Drupal up and running
Introduction to Drupal 7 - Getting Drupal up and runningIntroduction to Drupal 7 - Getting Drupal up and running
Introduction to Drupal 7 - Getting Drupal up and running
Kalin Chernev
 
Introduction to Drupal 7 - Making a slideshow with Views 3
Introduction to Drupal 7 - Making a slideshow with Views 3Introduction to Drupal 7 - Making a slideshow with Views 3
Introduction to Drupal 7 - Making a slideshow with Views 3
Kalin Chernev
 
Introduction to Drupal 7 Themes and design
Introduction to Drupal 7 Themes and designIntroduction to Drupal 7 Themes and design
Introduction to Drupal 7 Themes and design
Kalin Chernev
 
Introduction to Drupal 7 - Performance optimization
Introduction to Drupal 7 - Performance optimizationIntroduction to Drupal 7 - Performance optimization
Introduction to Drupal 7 - Performance optimization
Kalin Chernev
 
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
Anil Sagar
 
Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.
DrupalCamp Kyiv
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module developmentRachit Gupta
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
Angela Byron
 
Cypress report
Cypress reportCypress report
Cypress report
Adarsh
 
Drupal: Reusing functionality
Drupal: Reusing functionalityDrupal: Reusing functionality
Drupal: Reusing functionalityRaymond Muilwijk
 
Introduction to Drupal 7 - SEO
Introduction to Drupal 7 - SEOIntroduction to Drupal 7 - SEO
Introduction to Drupal 7 - SEO
Kalin Chernev
 
Forms 6i guide
Forms 6i guideForms 6i guide
Forms 6i guide
Vinay Kumar
 

Similar to Introduction to Drupal 7 - Content types and fields (20)

Introduction to Drupal 7 News section and home page block with views
Introduction to Drupal 7  News section and home page block with viewsIntroduction to Drupal 7  News section and home page block with views
Introduction to Drupal 7 News section and home page block with views
 
Introduction to Drupal 7 - Updating core, themes and modules. applying patches
Introduction to Drupal 7 - Updating core, themes and modules. applying patchesIntroduction to Drupal 7 - Updating core, themes and modules. applying patches
Introduction to Drupal 7 - Updating core, themes and modules. applying patches
 
Introduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content managementIntroduction to Drupal 7 - Basic Functionalities and Content management
Introduction to Drupal 7 - Basic Functionalities and Content management
 
Introduction to Drupal 7 - Blocks management and contexts
Introduction to Drupal 7 - Blocks management and contextsIntroduction to Drupal 7 - Blocks management and contexts
Introduction to Drupal 7 - Blocks management and contexts
 
Introduction to Drupal 7 - Panels
Introduction to Drupal 7 - PanelsIntroduction to Drupal 7 - Panels
Introduction to Drupal 7 - Panels
 
Introduction to Drupal 7 - Taxonomy Categorization - Homework included
Introduction to Drupal 7 - Taxonomy Categorization - Homework includedIntroduction to Drupal 7 - Taxonomy Categorization - Homework included
Introduction to Drupal 7 - Taxonomy Categorization - Homework included
 
Introduction to Drupal 7 - Webforms
Introduction to Drupal 7 - WebformsIntroduction to Drupal 7 - Webforms
Introduction to Drupal 7 - Webforms
 
Introduction to Drupal 7 Users and roles management
Introduction to Drupal 7 Users and roles managementIntroduction to Drupal 7 Users and roles management
Introduction to Drupal 7 Users and roles management
 
Introduction to Drupal 7 - Getting Drupal up and running
Introduction to Drupal 7 - Getting Drupal up and runningIntroduction to Drupal 7 - Getting Drupal up and running
Introduction to Drupal 7 - Getting Drupal up and running
 
Introduction to Drupal 7 - Making a slideshow with Views 3
Introduction to Drupal 7 - Making a slideshow with Views 3Introduction to Drupal 7 - Making a slideshow with Views 3
Introduction to Drupal 7 - Making a slideshow with Views 3
 
Introduction to Drupal 7 Themes and design
Introduction to Drupal 7 Themes and designIntroduction to Drupal 7 Themes and design
Introduction to Drupal 7 Themes and design
 
Introduction to Drupal 7 - Performance optimization
Introduction to Drupal 7 - Performance optimizationIntroduction to Drupal 7 - Performance optimization
Introduction to Drupal 7 - Performance optimization
 
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
 
Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.Oleksandr Medvediev - Content delivery tools in Drupal 8.
Oleksandr Medvediev - Content delivery tools in Drupal 8.
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module development
 
Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8Top 8 Improvements in Drupal 8
Top 8 Improvements in Drupal 8
 
Cypress report
Cypress reportCypress report
Cypress report
 
Drupal: Reusing functionality
Drupal: Reusing functionalityDrupal: Reusing functionality
Drupal: Reusing functionality
 
Introduction to Drupal 7 - SEO
Introduction to Drupal 7 - SEOIntroduction to Drupal 7 - SEO
Introduction to Drupal 7 - SEO
 
Forms 6i guide
Forms 6i guideForms 6i guide
Forms 6i guide
 

More from Kalin Chernev

Style guides in drupal development workflows
Style guides in drupal development workflowsStyle guides in drupal development workflows
Style guides in drupal development workflows
Kalin Chernev
 
RESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-sRESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-s
Kalin Chernev
 
Trainings and education at hackerspaces
Trainings and education at hackerspacesTrainings and education at hackerspaces
Trainings and education at hackerspaces
Kalin Chernev
 
Introduction to Frontend Development - Session 2 - CSS Fundamentals
Introduction to Frontend Development - Session 2 - CSS FundamentalsIntroduction to Frontend Development - Session 2 - CSS Fundamentals
Introduction to Frontend Development - Session 2 - CSS Fundamentals
Kalin Chernev
 
Introduction to Frontend Development - Session 1 - HTML Fundamentals
Introduction to Frontend Development - Session 1 - HTML FundamentalsIntroduction to Frontend Development - Session 1 - HTML Fundamentals
Introduction to Frontend Development - Session 1 - HTML Fundamentals
Kalin Chernev
 
SEO Fundamentals Outline Lecture 2
SEO Fundamentals Outline Lecture 2SEO Fundamentals Outline Lecture 2
SEO Fundamentals Outline Lecture 2
Kalin Chernev
 
Search Engine Optimization Fundamentals
Search Engine Optimization FundamentalsSearch Engine Optimization Fundamentals
Search Engine Optimization Fundamentals
Kalin Chernev
 
Hackerspaces in Bulgaria Lecture VarnaConf 2012
Hackerspaces in Bulgaria Lecture VarnaConf 2012Hackerspaces in Bulgaria Lecture VarnaConf 2012
Hackerspaces in Bulgaria Lecture VarnaConf 2012
Kalin Chernev
 
Introduction to Drupal 7 - Homework - webforms on webforms
Introduction to Drupal 7 - Homework - webforms on webformsIntroduction to Drupal 7 - Homework - webforms on webforms
Introduction to Drupal 7 - Homework - webforms on webforms
Kalin Chernev
 
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in DrupalIntroduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
Kalin Chernev
 
Introduction to Drupal 7 - Homework on making latest news slideshow block
Introduction to Drupal 7 - Homework on making latest news slideshow blockIntroduction to Drupal 7 - Homework on making latest news slideshow block
Introduction to Drupal 7 - Homework on making latest news slideshow block
Kalin Chernev
 
Introduction to Drupal 7 - Homework - making team section
Introduction to Drupal 7 - Homework - making team sectionIntroduction to Drupal 7 - Homework - making team section
Introduction to Drupal 7 - Homework - making team section
Kalin Chernev
 
Introduction to Drupal 7 - Image Styles
Introduction to Drupal 7 - Image StylesIntroduction to Drupal 7 - Image Styles
Introduction to Drupal 7 - Image Styles
Kalin Chernev
 
Business education
Business educationBusiness education
Business education
Kalin Chernev
 
Drupal course-plovdiv-week1-day-1
Drupal course-plovdiv-week1-day-1Drupal course-plovdiv-week1-day-1
Drupal course-plovdiv-week1-day-1Kalin Chernev
 
Drupal-курс-лекция-6
Drupal-курс-лекция-6Drupal-курс-лекция-6
Drupal-курс-лекция-6
Kalin Chernev
 
Курс по Drupal - лекция 3
Курс по Drupal - лекция 3Курс по Drupal - лекция 3
Курс по Drupal - лекция 3Kalin Chernev
 

More from Kalin Chernev (17)

Style guides in drupal development workflows
Style guides in drupal development workflowsStyle guides in drupal development workflows
Style guides in drupal development workflows
 
RESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-sRESTful with Drupal - in-s and out-s
RESTful with Drupal - in-s and out-s
 
Trainings and education at hackerspaces
Trainings and education at hackerspacesTrainings and education at hackerspaces
Trainings and education at hackerspaces
 
Introduction to Frontend Development - Session 2 - CSS Fundamentals
Introduction to Frontend Development - Session 2 - CSS FundamentalsIntroduction to Frontend Development - Session 2 - CSS Fundamentals
Introduction to Frontend Development - Session 2 - CSS Fundamentals
 
Introduction to Frontend Development - Session 1 - HTML Fundamentals
Introduction to Frontend Development - Session 1 - HTML FundamentalsIntroduction to Frontend Development - Session 1 - HTML Fundamentals
Introduction to Frontend Development - Session 1 - HTML Fundamentals
 
SEO Fundamentals Outline Lecture 2
SEO Fundamentals Outline Lecture 2SEO Fundamentals Outline Lecture 2
SEO Fundamentals Outline Lecture 2
 
Search Engine Optimization Fundamentals
Search Engine Optimization FundamentalsSearch Engine Optimization Fundamentals
Search Engine Optimization Fundamentals
 
Hackerspaces in Bulgaria Lecture VarnaConf 2012
Hackerspaces in Bulgaria Lecture VarnaConf 2012Hackerspaces in Bulgaria Lecture VarnaConf 2012
Hackerspaces in Bulgaria Lecture VarnaConf 2012
 
Introduction to Drupal 7 - Homework - webforms on webforms
Introduction to Drupal 7 - Homework - webforms on webformsIntroduction to Drupal 7 - Homework - webforms on webforms
Introduction to Drupal 7 - Homework - webforms on webforms
 
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in DrupalIntroduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
Introduction to Drupal 7 - Installing and configuring WYSIWYG editors in Drupal
 
Introduction to Drupal 7 - Homework on making latest news slideshow block
Introduction to Drupal 7 - Homework on making latest news slideshow blockIntroduction to Drupal 7 - Homework on making latest news slideshow block
Introduction to Drupal 7 - Homework on making latest news slideshow block
 
Introduction to Drupal 7 - Homework - making team section
Introduction to Drupal 7 - Homework - making team sectionIntroduction to Drupal 7 - Homework - making team section
Introduction to Drupal 7 - Homework - making team section
 
Introduction to Drupal 7 - Image Styles
Introduction to Drupal 7 - Image StylesIntroduction to Drupal 7 - Image Styles
Introduction to Drupal 7 - Image Styles
 
Business education
Business educationBusiness education
Business education
 
Drupal course-plovdiv-week1-day-1
Drupal course-plovdiv-week1-day-1Drupal course-plovdiv-week1-day-1
Drupal course-plovdiv-week1-day-1
 
Drupal-курс-лекция-6
Drupal-курс-лекция-6Drupal-курс-лекция-6
Drupal-курс-лекция-6
 
Курс по Drupal - лекция 3
Курс по Drupal - лекция 3Курс по Drupal - лекция 3
Курс по Drupal - лекция 3
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

Introduction to Drupal 7 - Content types and fields

  • 1. Introduction to Drupal 7 Session 2.2 Content types and fields Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 1
  • 2. Agenda • What is a content type • Content type settings • Fields • Popular contributed modules Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 2
  • 3. What is a content type • Simply: the most powerful Drupal feature • By default: 2 content types: – Basic page – Article • Unlimited number of custom content types • Many types of fields, no limitations on the number of them Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 3
  • 4. Content type settings • Name and description fields • Submission form settings • Publishing options • Display settings for meta data • Comments settings • Menu settings • Other – when additional modules are enabled Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 4
  • 5. Creating new content type • Administration > Structure > Content types • URL: ../admin/structure/types Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 5
  • 6. Adding news content type example Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 6
  • 7. Fields management • Administration > Structure > Content types • {The content type} > manage fields Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 7
  • 8. Manage Fields vs Manage Displays • Manage fields – Adding new fields – Removing fields – Grouping fields (with additional module) • Order of the fields • Setting labels display • Setting fields contents display • Again, grouping fields in groups (with additional module) Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 8
  • 9. Adding a date field to news • Download/Install Date module • Enable “Date”, “Date API” and “Date Popup” • Go to admin/structure/types/manage/news/fields • Add a new field: – Label: Original publish date – Field type: Date – Machine readable: “orig_pub_date” – Widget type: Pop-up calendar Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 9
  • 10. The date field • Field settings: – Date attributes to collect: leave it as it is, the granularity is good to be by minutes – Collect an end date: leave it as it is, we don’t need to collect end date value – Time zone handling: set to “No time zone conversion” – Cache dates: leave it as it is, we don’t need caching for now Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 10
  • 11. Advanced date field settings • Required field: yes, we want to make sure the user has filled in a value here • Date entry options: set it as you prefer the format to be • Starting year: -0 years from now: we don’t really need more time back • Ending year: +0 years from now: we don’t need more time ahead as well • Default date: set it to “Now” as we want the field to take current time by default • Number of values: set it to “1”, as we need only 1 value Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 11
  • 12. Adding the date field Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 12
  • 13. System date settings Reports will notify you for required date settings. Some recommended options: Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 13
  • 14. Adding an image field Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 14
  • 15. Image field settings • Allowed file extensions: the extensions the user can upload in the field: jpg, png, etc • File directory: used rarely, only if you want the field to store images in specific folder which is not the sites/default/files folder • Maximum and minimum image resolutions: used rarely, only if you want to limit the input dimensions of the images • Maximum upload size: this is the limitation you can set on the physical size of the files • Enabling Alt and Title: good to have if the administrator/editor has some SEO knowledge to populate these meta data • Preview image style: options come from Image style module. The size you specify here is only for the back-end work of the admin • Number of values: from 1 to unlimited, depending on the case • Default image: rarely used, only if a feature or section requires an image, you can set one default to be displayed when the admin does not upload one Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 15
  • 16. Adding tags field • You can use the default existing Tags vocabulary field • Use the ”Autocomplete term widget (tagging)” widget type • Save and create with default settings Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 16
  • 17. Adding tags field • You can either use and existing Category vocabulary field or create one (if the first one is not available) (1st screenshot) • Use the ”Select list” widget type as you want the Category field to be a list of values, only 1 of which can be selected • Set the number of values to be 1, in the Category field settings (second screenshot) Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 17
  • 18. Compiling news content type feature • We can export our News content type configurations into code for better versioning • Make sure you have the Features module enabled and go to Administer > Structure > Features > Create new • Name and description of the feature are arbitrary – anyway aim to specify them logically enough you can remind yourself what the feature is about • You can start with 7.x-1.0 for the version Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 18
  • 19. News content type feature • Select “News” content type from the node bundle components options • Select all fields related to the news content type from the Fields component: all that start with “node-news-…” • Download the feature • Place the feature in your modules directory and enable it Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 19
  • 20. News content type feature Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 20
  • 21. Enabling the News content type • Administration > Structure > Features Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 21
  • 22. Popular contributed modules • Date – for date type fields • Field Group – grouping multiple fields in a fieldset with various options of output • Link – having options for attributes • Email – including validations • Field permissions – for settings permissions on a field-by field level • Media – different media handling • References – referencing nodes and users Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 22
  • 23. Time for questions Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 23
  • 24. Contacts Kalin Chernev – E: kalata@shtrak.eu – T: twitter.com/kalinchernev – U: http://shtrak.eu/kalata Drupalist: Kalin Chernev Course by Init Lab (http://initlab.org) 24