SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Drupal basics

   Part 2
Training plan
●   Taxonomy
●   Users management
●   Creating new content types with field
●   Image management (image style, galleries)
Taxonomy
●   The taxonomy module allows you to categorize your content
    using both tags and administrator defined terms. It is a flexible
    tool for classifying content with many advanced features.
●   Taxonomy administration page: admin/content/taxonomy


    Create new
    vocabulary




    List of vocabularies
Add term to vocabulary
 Add term




Term name




Advanced options:
parents, synonims,
related terms
Add vocabulary to content type
Create vocabulary



Vocabulary name: Brand
Add vocabulary to content type 2



Advanced
settings of
vocabulary
(field)
Create content with taxonomy



Taxonomy options:
Car brand
Create content with taxonomy



Taxonomy options:
Car brand
Taxonomy term page



Term name




Nodes assigned
to term




 Page: taxonomy/term/1
Practice
●Create vocabulary Color for content type Car and
add some terms (black, red, blue, silver, etc...).
User must select one option.
●Create vocabulary Body type for content type Car

and add some terms (hatchback, coupe, etc...).
User must select one option.
●Create vocabulary Car Equipment for content type

Car and add some terms (ABS, Alarm, Electric
Windows, Traction Control, etc...). User can select
one or more options.
●Add some Cars (nodes) and assign taxonomy

options
More practice
●Create content type News: enabled comments,
published on front page
●Create vocabulary News category and add some

terms (Business, Sport, Technology, etc...). User
can select one option
●Create vocabulary News tags and enable option

„Tags”
●Create 5 news nodes, assign News category and

ad tags
Page taxonomy/term/TID
●taxonomy/term/[TID] – display nodes assigned to
term [TID]
●taxonomy/term/[TID1]+[TID2]+[TID3] – display

nodes assigned to term [TID1] or [TID2] or [TID3]
●taxonomy/term/[TID1],[TID2] – display nodes

assigned to term [TID1] and [TID2]
Term hierarchy (1)
●Terms can have hierarchy (parent - children)


Select parent
with drag and
drop UI
Users – basic informations

●In Drupal you can create users accounts
●Each user has name and numeric identificator

(uid)
●After installation Drupal has one user –

administrator (uid = 1)
●Administrator has access to all options

●You can assign roles to user

●You can assign permissions to roles
Users – roles - permissions

                               Roles
                      (anonymous, authenticated,
                          moderator, editor)




                                                        Permission
      Users                                        (access user profiles,
(admin, joe, steve)                                 create story content,
                                                    access comments)
Roles
●Default roles after installation
 ● anonymous user – all not logged in users

 ● authenticated user – all logged in users

●You can't delete default roles

●You can create unlimited number of new roles
Create new role




New role name




Page: admin/people/permissions/roles
Role permissions


                                       Set permission to
                                       role:
                                       ●create page, story,

                                       car
                                       ●delete any

                                       page,story, car
                                       ●edit any page,

                                       story, car




Page: admin/people/permissions
Inheritance permissions
         Inheritance of logged-on user
         permissions.




                No need to select if permissions are assigned
                to the role „authenticated user”

Page: admin/people/permissions
Users management
     Add new user




Filter options


Update options


Users list




     Page: admin/people
Create new user


   Username, e-mail and
   password




   Status – if „blocked”
   user can't log in




   Assigned roles

Page: admin/people/create
Users list




         User name          Assigned roles    Edit link




Page: admin/people/create
Practice

●Create roles and assign permissions:
 ● „car editor”, permissions: create, edit and

   delete car
 ● „story editor”, permissions: create, edit and

   delete story
●Create users:

 ● user2 – role „car editor”

 ● user3 – role „story editor”

●Log in as „user2” and „user3” and check

permissions
Field (CCK in D6)

●CCK – Content Construction Kit
http://drupal.org/project/cck (Drupal 7 has this
module in core with names Fields)
●Default node has title and body

●Fields allow to create additional fields for nodes

(text fields, files upload, select lists, checkboxes,
 references to other nodes and users)
Using Fields
  Go to edit content type Car:
 admin/structure/types/manage/car/fields




Manage fields and
Manege display
Manage fields

Current node fields
(defaults). You can
change order of fields.




Create new field


Use existing field


Create new group of fields
(http://drupal.org/project/field_group)
Creating new field (1)




Label   Field name (stored in database as              Field type and field
        identificator). Best practice: always insert   widget
        node type as field name prefix, example:
        field_story_author, field_page_information     (like in Taxonomy term)
Creating new field (2)
Required



Help text, displayed under field
on node add form

Format of text field

Default value


Number of allowed values


Minimum and maximum value
Creating new field (3)




New field




                                                Configure and Remove links


Page: admin/structure/types/manage/car/fields
Creating new field (4)




New field on node add page




Page: node/add/car
Creating new field (5)
Node view page: node/[nid]

Node title


File field




  New field

                         Taxonomy terms
Display fields (1)




           Label options        Display format


Page: admin/structure/types/manage/car/display
Display fields (2)




Display options:
●

 ● Label above

 ● Decimal marker: Decimal point

 ● Scale: 2
Practice

Create new fields for Car node type:
●

● Gears – integer, select list (options 4, 5, 6)

● Gearbox: - select list (options: manual,

  automatic)
● Kerb weight – integer, suffix „kg”

● Door count – integer, select list (options 3, 4, 5)
Other type of Field

   ●Add new field type: file upload
   ●Go to admin/modules and enable File module




File module
File module (1)
●Go to admin/structure/types/manage/car/fields
and add new field




                        Field type: File
File module (2)



Allowed files extensions


 File size restrictions




 Number of values: set to
 unlimited
File module (3)
 ● Go to node/add/car and add content with files




File upload options
File module (4)
Node view page




 Uploaded files
Practice
●Create new field:
  ● Documents – field type: file upload, unlimited number of values

●Create new group of fields, label: Files, name group_car_files

●Insert fields „Manuals” and „Documents” into group „Files”




    Node add page
    Field group: Files
Practice
●Create new group of fields, label: Details, name group_car_details
●Insert fields „Engine size”, „Gears”, „Gearbox”, „Kerb weight”,

„”Door count into group „Details”


    Group: Details
Fields: Image
 ●Image module provides an image upload field for Fields.
 ●Go to admin/modules and enable module Image




Image module
Image (1)
●Go to Content management → Content types → Edit Car →
Manage fields
●Create new field: Photos, field_car_photos




                                       Field type: File - Image




                                  Field type: File - Image
Image (2)



Allowed image extensions




Image options: ALT, Title,
Default image
Image (3)
Go to Content management → Create content →
Car




Photos upload options
Image (4)




Node view page:
Uploaded photos
Image style
●   Image style page: admin/config/media/image-styles
Image styles (1)
●Go to Site config → Image style
●Add new style

●Add action: Scale




    Action: Scale
Image styles (2)
   Preset edit options   Name




Actions

New actions




                                Configure or delete action
Using Image style in Image field (1)
●Go to Content management → Content types → Edit Car → Manage
Display
●Set options for Photos field:

  ● Teaser: hidden

  ● Full node: width400px image linked to node




                                     ImageCache preset
Using ImageCache presets in CCK (2)
Create Car node and add some photos larger than 400px
●




    Now all images
    has the same
    width
Practice
●Create new ImageCache preset and assign it
for field Photos in Car node type
●Create new field in Story node type: Photos

(field_story_photos)
●Create new Car node and test preset

●Create new ImageCache preset

●Assign new preset for field Photos

field_story_photos
●Create new Story node and test preset
Summary
 What you should know after this stage?
●Taxonomy

●User management

●Create custom fields for content

●Create ImageCache preset and use it in CCK

fields
Thank you for your attention
                Contact:


              Karol Bryksa
         Email: kb@ratioweb.pl
          Tel: +48 517 767 205


           Grzegorz Bartman
   E-mail: grzegorz.bartman@openbit.pl
          Tel: +48 882 515 514

Weitere ähnliche Inhalte

Was ist angesagt?

Drupal module development training delhi
Drupal module development training delhiDrupal module development training delhi
Drupal module development training delhi
unitedwebsoft
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
NAVER D2
 

Was ist angesagt? (18)

Fronteers - Drupal 7 ux
Fronteers   - Drupal 7 uxFronteers   - Drupal 7 ux
Fronteers - Drupal 7 ux
 
Drupal module development training delhi
Drupal module development training delhiDrupal module development training delhi
Drupal module development training delhi
 
Drupal 8 introduction to theming
Drupal 8  introduction to themingDrupal 8  introduction to theming
Drupal 8 introduction to theming
 
OpenCms Days 2013 - Details of the OpenCms 9 detail pages
OpenCms Days 2013 - Details of the OpenCms 9 detail pagesOpenCms Days 2013 - Details of the OpenCms 9 detail pages
OpenCms Days 2013 - Details of the OpenCms 9 detail pages
 
Rapid site production with Drupal
Rapid site production with DrupalRapid site production with Drupal
Rapid site production with Drupal
 
GWT training session 2
GWT training session 2GWT training session 2
GWT training session 2
 
Introduction to Moodle Development
Introduction to Moodle DevelopmentIntroduction to Moodle Development
Introduction to Moodle Development
 
Debugging in drupal 8
Debugging in drupal 8Debugging in drupal 8
Debugging in drupal 8
 
Your first d8 module
Your first d8 moduleYour first d8 module
Your first d8 module
 
How Browser Works?
How Browser Works?How Browser Works?
How Browser Works?
 
Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8
Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8
Brisbane Drupal meetup - 2016 Mar - Build module in Drupal 8
 
OVERVIEW: Chromium Source Tree
OVERVIEW: Chromium Source TreeOVERVIEW: Chromium Source Tree
OVERVIEW: Chromium Source Tree
 
Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3Up to Speed on HTML 5 and CSS 3
Up to Speed on HTML 5 and CSS 3
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
 
Drupal 6 Overview
Drupal 6 OverviewDrupal 6 Overview
Drupal 6 Overview
 
Drupal Theming
Drupal Theming Drupal Theming
Drupal Theming
 
drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.x
 

Ähnlich wie Szkolenie drupal-podstawy 2

Openbit szkolenie-drupal-podstawy 2
Openbit szkolenie-drupal-podstawy 2Openbit szkolenie-drupal-podstawy 2
Openbit szkolenie-drupal-podstawy 2
Grzegorz Bartman
 
Xv ocd2010-jsharp
Xv ocd2010-jsharpXv ocd2010-jsharp
Xv ocd2010-jsharp
Jason Sharp
 
Dreamweaver Notes
Dreamweaver NotesDreamweaver Notes
Dreamweaver Notes
smasi27
 
Drupal kickstart-workshop
Drupal kickstart-workshopDrupal kickstart-workshop
Drupal kickstart-workshop
Ted Husted
 

Ähnlich wie Szkolenie drupal-podstawy 2 (20)

Openbit szkolenie-drupal-podstawy 2
Openbit szkolenie-drupal-podstawy 2Openbit szkolenie-drupal-podstawy 2
Openbit szkolenie-drupal-podstawy 2
 
Building University Websites with the Drupal Content Management System
Building University Websites with the Drupal Content Management SystemBuilding University Websites with the Drupal Content Management System
Building University Websites with the Drupal Content Management System
 
Xv ocd2010-jsharp
Xv ocd2010-jsharpXv ocd2010-jsharp
Xv ocd2010-jsharp
 
An Introduction to Drupal
An Introduction to DrupalAn Introduction to Drupal
An Introduction to Drupal
 
Drupal8 corporate training in Hyderabad
Drupal8 corporate training in HyderabadDrupal8 corporate training in Hyderabad
Drupal8 corporate training in Hyderabad
 
Drupal 7 Features - Introduction - Basics
Drupal 7 Features - Introduction - BasicsDrupal 7 Features - Introduction - Basics
Drupal 7 Features - Introduction - Basics
 
Introduction to WordPress & Theme Development
Introduction to WordPress & Theme DevelopmentIntroduction to WordPress & Theme Development
Introduction to WordPress & Theme Development
 
Dw cs3-introduction
Dw cs3-introductionDw cs3-introduction
Dw cs3-introduction
 
Advanced Intro to Wordpress
Advanced Intro to WordpressAdvanced Intro to Wordpress
Advanced Intro to Wordpress
 
Chrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptxChrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptx
 
Tutorial rubedo cms, content layouts
Tutorial rubedo cms, content layoutsTutorial rubedo cms, content layouts
Tutorial rubedo cms, content layouts
 
Synapseindia drupal intro 0
Synapseindia drupal intro 0Synapseindia drupal intro 0
Synapseindia drupal intro 0
 
ownCloud overview and tutorial
ownCloud overview and tutorialownCloud overview and tutorial
ownCloud overview and tutorial
 
Necto 16 training 16 workboard properties and advanced features
Necto 16 training 16   workboard properties and advanced featuresNecto 16 training 16   workboard properties and advanced features
Necto 16 training 16 workboard properties and advanced features
 
Dreamweaver Notes
Dreamweaver NotesDreamweaver Notes
Dreamweaver Notes
 
Fms Web Cms Training
Fms Web Cms TrainingFms Web Cms Training
Fms Web Cms Training
 
Drupal kickstart-workshop
Drupal kickstart-workshopDrupal kickstart-workshop
Drupal kickstart-workshop
 
14 - Panorama Necto 14 workboard properties and advanced features - visualiz...
14  - Panorama Necto 14 workboard properties and advanced features - visualiz...14  - Panorama Necto 14 workboard properties and advanced features - visualiz...
14 - Panorama Necto 14 workboard properties and advanced features - visualiz...
 
Dolibarr - What's new 3.9 and 4.0 (english)
Dolibarr - What's new 3.9 and 4.0 (english)Dolibarr - What's new 3.9 and 4.0 (english)
Dolibarr - What's new 3.9 and 4.0 (english)
 
Wordpress as a CMS
Wordpress as a CMSWordpress as a CMS
Wordpress as a CMS
 

Mehr von Grzegorz Bartman

Mehr von Grzegorz Bartman (20)

DrupalDay Podstawy Drupal 8
DrupalDay Podstawy Drupal 8DrupalDay Podstawy Drupal 8
DrupalDay Podstawy Drupal 8
 
Encje w drupalu - DrupalCamp Wroclaw 2015
Encje w drupalu - DrupalCamp Wroclaw 2015Encje w drupalu - DrupalCamp Wroclaw 2015
Encje w drupalu - DrupalCamp Wroclaw 2015
 
DrupalDay podstawy systemu Drupal (Wersja skrócona)
DrupalDay podstawy systemu Drupal (Wersja skrócona)DrupalDay podstawy systemu Drupal (Wersja skrócona)
DrupalDay podstawy systemu Drupal (Wersja skrócona)
 
Struktura i własności systemu zarządzania treścią Drupal
Struktura i własności systemu zarządzania treścią DrupalStruktura i własności systemu zarządzania treścią Drupal
Struktura i własności systemu zarządzania treścią Drupal
 
Code driven development w Drupalu 7 | DrupalCamp Wrocław 2014
Code driven development w Drupalu 7 | DrupalCamp Wrocław 2014Code driven development w Drupalu 7 | DrupalCamp Wrocław 2014
Code driven development w Drupalu 7 | DrupalCamp Wrocław 2014
 
DrupalDay & Drupal Global Training Days - Wprowadzenie do Drupala
DrupalDay & Drupal Global Training Days - Wprowadzenie do DrupalaDrupalDay & Drupal Global Training Days - Wprowadzenie do Drupala
DrupalDay & Drupal Global Training Days - Wprowadzenie do Drupala
 
Dlaczego Twoja kolejna aplikacja powinna bazować na platformie Drupal?
Dlaczego Twoja kolejna aplikacja powinna bazować na platformie Drupal?Dlaczego Twoja kolejna aplikacja powinna bazować na platformie Drupal?
Dlaczego Twoja kolejna aplikacja powinna bazować na platformie Drupal?
 
Automatyzacja w tworzeniu aplikacji opartych Drupala
Automatyzacja w tworzeniu aplikacji opartych DrupalaAutomatyzacja w tworzeniu aplikacji opartych Drupala
Automatyzacja w tworzeniu aplikacji opartych Drupala
 
Bazy danych w Drupalu 7. Przygotowanie tabeli przechowującej wpisy chatu
Bazy danych w Drupalu 7. Przygotowanie tabeli przechowującej wpisy chatuBazy danych w Drupalu 7. Przygotowanie tabeli przechowującej wpisy chatu
Bazy danych w Drupalu 7. Przygotowanie tabeli przechowującej wpisy chatu
 
Wprowadzenie do pisania własnych modułów oraz do systemu menu.
Wprowadzenie do pisania własnych modułów oraz do systemu menu. Wprowadzenie do pisania własnych modułów oraz do systemu menu.
Wprowadzenie do pisania własnych modułów oraz do systemu menu.
 
Podstawy programowania w Drupalu - Drupal idzie na studia - Jarosław Sobiecki
Podstawy programowania w Drupalu - Drupal idzie na studia - Jarosław SobieckiPodstawy programowania w Drupalu - Drupal idzie na studia - Jarosław Sobiecki
Podstawy programowania w Drupalu - Drupal idzie na studia - Jarosław Sobiecki
 
WYSIWYG w Drupalu 7 - Tomasz Rychter
WYSIWYG w Drupalu 7 - Tomasz RychterWYSIWYG w Drupalu 7 - Tomasz Rychter
WYSIWYG w Drupalu 7 - Tomasz Rychter
 
Podstawy SEO w Drupalu 7 - Jarosław Sobiecki
Podstawy SEO w Drupalu 7 - Jarosław SobieckiPodstawy SEO w Drupalu 7 - Jarosław Sobiecki
Podstawy SEO w Drupalu 7 - Jarosław Sobiecki
 
Drupal Feeds - Wiktor Burbo
Drupal Feeds - Wiktor BurboDrupal Feeds - Wiktor Burbo
Drupal Feeds - Wiktor Burbo
 
Drupal Context - Agnieszka Cupek
Drupal Context - Agnieszka CupekDrupal Context - Agnieszka Cupek
Drupal Context - Agnieszka Cupek
 
Drupal Features - Agnieszka Piłasiewicz
Drupal Features - Agnieszka PiłasiewiczDrupal Features - Agnieszka Piłasiewicz
Drupal Features - Agnieszka Piłasiewicz
 
Drupal Rules - Drupal Idzie Na Studia - Jarosław Sobiecki
Drupal Rules - Drupal Idzie Na Studia - Jarosław SobieckiDrupal Rules - Drupal Idzie Na Studia - Jarosław Sobiecki
Drupal Rules - Drupal Idzie Na Studia - Jarosław Sobiecki
 
Podstawowe informacje o szablonach w Drupalu [openBIT]
Podstawowe informacje o szablonach w Drupalu [openBIT]Podstawowe informacje o szablonach w Drupalu [openBIT]
Podstawowe informacje o szablonach w Drupalu [openBIT]
 
Drupal 7 training - Views
Drupal 7 training - ViewsDrupal 7 training - Views
Drupal 7 training - Views
 
Drupal 6 - podstawy - www.openbit.pl
Drupal 6 - podstawy - www.openbit.plDrupal 6 - podstawy - www.openbit.pl
Drupal 6 - podstawy - www.openbit.pl
 

Szkolenie drupal-podstawy 2

  • 1. Drupal basics Part 2
  • 2. Training plan ● Taxonomy ● Users management ● Creating new content types with field ● Image management (image style, galleries)
  • 3. Taxonomy ● The taxonomy module allows you to categorize your content using both tags and administrator defined terms. It is a flexible tool for classifying content with many advanced features. ● Taxonomy administration page: admin/content/taxonomy Create new vocabulary List of vocabularies
  • 4. Add term to vocabulary Add term Term name Advanced options: parents, synonims, related terms
  • 5. Add vocabulary to content type
  • 7. Add vocabulary to content type 2 Advanced settings of vocabulary (field)
  • 8. Create content with taxonomy Taxonomy options: Car brand
  • 9. Create content with taxonomy Taxonomy options: Car brand
  • 10. Taxonomy term page Term name Nodes assigned to term Page: taxonomy/term/1
  • 11. Practice ●Create vocabulary Color for content type Car and add some terms (black, red, blue, silver, etc...). User must select one option. ●Create vocabulary Body type for content type Car and add some terms (hatchback, coupe, etc...). User must select one option. ●Create vocabulary Car Equipment for content type Car and add some terms (ABS, Alarm, Electric Windows, Traction Control, etc...). User can select one or more options. ●Add some Cars (nodes) and assign taxonomy options
  • 12. More practice ●Create content type News: enabled comments, published on front page ●Create vocabulary News category and add some terms (Business, Sport, Technology, etc...). User can select one option ●Create vocabulary News tags and enable option „Tags” ●Create 5 news nodes, assign News category and ad tags
  • 13. Page taxonomy/term/TID ●taxonomy/term/[TID] – display nodes assigned to term [TID] ●taxonomy/term/[TID1]+[TID2]+[TID3] – display nodes assigned to term [TID1] or [TID2] or [TID3] ●taxonomy/term/[TID1],[TID2] – display nodes assigned to term [TID1] and [TID2]
  • 14. Term hierarchy (1) ●Terms can have hierarchy (parent - children) Select parent with drag and drop UI
  • 15. Users – basic informations ●In Drupal you can create users accounts ●Each user has name and numeric identificator (uid) ●After installation Drupal has one user – administrator (uid = 1) ●Administrator has access to all options ●You can assign roles to user ●You can assign permissions to roles
  • 16. Users – roles - permissions Roles (anonymous, authenticated, moderator, editor) Permission Users (access user profiles, (admin, joe, steve) create story content, access comments)
  • 17. Roles ●Default roles after installation ● anonymous user – all not logged in users ● authenticated user – all logged in users ●You can't delete default roles ●You can create unlimited number of new roles
  • 18. Create new role New role name Page: admin/people/permissions/roles
  • 19. Role permissions Set permission to role: ●create page, story, car ●delete any page,story, car ●edit any page, story, car Page: admin/people/permissions
  • 20. Inheritance permissions Inheritance of logged-on user permissions. No need to select if permissions are assigned to the role „authenticated user” Page: admin/people/permissions
  • 21. Users management Add new user Filter options Update options Users list Page: admin/people
  • 22. Create new user Username, e-mail and password Status – if „blocked” user can't log in Assigned roles Page: admin/people/create
  • 23. Users list User name Assigned roles Edit link Page: admin/people/create
  • 24. Practice ●Create roles and assign permissions: ● „car editor”, permissions: create, edit and delete car ● „story editor”, permissions: create, edit and delete story ●Create users: ● user2 – role „car editor” ● user3 – role „story editor” ●Log in as „user2” and „user3” and check permissions
  • 25. Field (CCK in D6) ●CCK – Content Construction Kit http://drupal.org/project/cck (Drupal 7 has this module in core with names Fields) ●Default node has title and body ●Fields allow to create additional fields for nodes (text fields, files upload, select lists, checkboxes, references to other nodes and users)
  • 26. Using Fields Go to edit content type Car: admin/structure/types/manage/car/fields Manage fields and Manege display
  • 27. Manage fields Current node fields (defaults). You can change order of fields. Create new field Use existing field Create new group of fields (http://drupal.org/project/field_group)
  • 28. Creating new field (1) Label Field name (stored in database as Field type and field identificator). Best practice: always insert widget node type as field name prefix, example: field_story_author, field_page_information (like in Taxonomy term)
  • 29. Creating new field (2) Required Help text, displayed under field on node add form Format of text field Default value Number of allowed values Minimum and maximum value
  • 30. Creating new field (3) New field Configure and Remove links Page: admin/structure/types/manage/car/fields
  • 31. Creating new field (4) New field on node add page Page: node/add/car
  • 32. Creating new field (5) Node view page: node/[nid] Node title File field New field Taxonomy terms
  • 33. Display fields (1) Label options Display format Page: admin/structure/types/manage/car/display
  • 34. Display fields (2) Display options: ● ● Label above ● Decimal marker: Decimal point ● Scale: 2
  • 35. Practice Create new fields for Car node type: ● ● Gears – integer, select list (options 4, 5, 6) ● Gearbox: - select list (options: manual, automatic) ● Kerb weight – integer, suffix „kg” ● Door count – integer, select list (options 3, 4, 5)
  • 36. Other type of Field ●Add new field type: file upload ●Go to admin/modules and enable File module File module
  • 37. File module (1) ●Go to admin/structure/types/manage/car/fields and add new field Field type: File
  • 38. File module (2) Allowed files extensions File size restrictions Number of values: set to unlimited
  • 39. File module (3) ● Go to node/add/car and add content with files File upload options
  • 40. File module (4) Node view page Uploaded files
  • 41. Practice ●Create new field: ● Documents – field type: file upload, unlimited number of values ●Create new group of fields, label: Files, name group_car_files ●Insert fields „Manuals” and „Documents” into group „Files” Node add page Field group: Files
  • 42. Practice ●Create new group of fields, label: Details, name group_car_details ●Insert fields „Engine size”, „Gears”, „Gearbox”, „Kerb weight”, „”Door count into group „Details” Group: Details
  • 43. Fields: Image ●Image module provides an image upload field for Fields. ●Go to admin/modules and enable module Image Image module
  • 44. Image (1) ●Go to Content management → Content types → Edit Car → Manage fields ●Create new field: Photos, field_car_photos Field type: File - Image Field type: File - Image
  • 45. Image (2) Allowed image extensions Image options: ALT, Title, Default image
  • 46. Image (3) Go to Content management → Create content → Car Photos upload options
  • 47. Image (4) Node view page: Uploaded photos
  • 48. Image style ● Image style page: admin/config/media/image-styles
  • 49. Image styles (1) ●Go to Site config → Image style ●Add new style ●Add action: Scale Action: Scale
  • 50. Image styles (2) Preset edit options Name Actions New actions Configure or delete action
  • 51. Using Image style in Image field (1) ●Go to Content management → Content types → Edit Car → Manage Display ●Set options for Photos field: ● Teaser: hidden ● Full node: width400px image linked to node ImageCache preset
  • 52. Using ImageCache presets in CCK (2) Create Car node and add some photos larger than 400px ● Now all images has the same width
  • 53. Practice ●Create new ImageCache preset and assign it for field Photos in Car node type ●Create new field in Story node type: Photos (field_story_photos) ●Create new Car node and test preset ●Create new ImageCache preset ●Assign new preset for field Photos field_story_photos ●Create new Story node and test preset
  • 54. Summary What you should know after this stage? ●Taxonomy ●User management ●Create custom fields for content ●Create ImageCache preset and use it in CCK fields
  • 55. Thank you for your attention Contact: Karol Bryksa Email: kb@ratioweb.pl Tel: +48 517 767 205 Grzegorz Bartman E-mail: grzegorz.bartman@openbit.pl Tel: +48 882 515 514