Drupal basics   Part 2
Training plan●   Taxonomy●   Users management●   Creating new content types with field●   Image management (image style, g...
Taxonomy●   The taxonomy module allows you to categorize your content    using both tags and administrator defined terms. ...
Add term to vocabulary Add termTerm nameAdvanced options:parents, synonims,related terms
Add vocabulary to content type
Create vocabularyVocabulary name: Brand
Add vocabulary to content type 2Advancedsettings ofvocabulary(field)
Create content with taxonomyTaxonomy options:Car brand
Create content with taxonomyTaxonomy options:Car brand
Taxonomy term pageTerm nameNodes assignedto term Page: taxonomy/term/1
Practice●Create vocabulary Color for content type Car andadd some terms (black, red, blue, silver, etc...).User must selec...
More practice●Create content type News: enabled comments,published on front page●Create vocabulary News category and add s...
Page taxonomy/term/TID●taxonomy/term/[TID] – display nodes assigned toterm [TID]●taxonomy/term/[TID1]+[TID2]+[TID3] – disp...
Term hierarchy (1)●Terms can have hierarchy (parent - children)Select parentwith drag anddrop UI
Users – basic informations●In Drupal you can create users accounts●Each user has name and numeric identificator(uid)●After...
Users – roles - permissions                               Roles                      (anonymous, authenticated,           ...
Roles●Default roles after installation ● anonymous user – all not logged in users ● authenticated user – all logged in use...
Create new roleNew role namePage: admin/people/permissions/roles
Role permissions                                       Set permission to                                       role:      ...
Inheritance permissions         Inheritance of logged-on user         permissions.                No need to select if per...
Users management     Add new userFilter optionsUpdate optionsUsers list     Page: admin/people
Create new user   Username, e-mail and   password   Status – if „blocked”   user cant log in   Assigned rolesPage: admin/p...
Users list         User name          Assigned roles    Edit linkPage: admin/people/create
Practice●Create roles and assign permissions: ● „car editor”, permissions: create, edit and   delete car ● „story editor”,...
Field (CCK in D6)●CCK – Content Construction Kithttp://drupal.org/project/cck (Drupal 7 has thismodule in core with names ...
Using Fields  Go to edit content type Car: admin/structure/types/manage/car/fieldsManage fields andManege display
Manage fieldsCurrent node fields(defaults). You canchange order of fields.Create new fieldUse existing fieldCreate new gro...
Creating new field (1)Label   Field name (stored in database as              Field type and field        identificator). B...
Creating new field (2)RequiredHelp text, displayed under fieldon node add formFormat of text fieldDefault valueNumber of a...
Creating new field (3)New field                                                Configure and Remove linksPage: admin/struc...
Creating new field (4)New field on node add pagePage: node/add/car
Creating new field (5)Node view page: node/[nid]Node titleFile field  New field                         Taxonomy terms
Display fields (1)           Label options        Display formatPage: admin/structure/types/manage/car/display
Display fields (2)Display options:● ● Label above ● Decimal marker: Decimal point ● Scale: 2
PracticeCreate new fields for Car node type:●● Gears – integer, select list (options 4, 5, 6)● Gearbox: - select list (opt...
Other type of Field   ●Add new field type: file upload   ●Go to admin/modules and enable File moduleFile module
File module (1)●Go to admin/structure/types/manage/car/fieldsand 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 filesFile 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, ...
Practice●Create new group of fields, label: Details, name group_car_details●Insert fields „Engine size”, „Gears”, „Gearbox...
Fields: Image ●Image module provides an image upload field for Fields. ●Go to admin/modules and enable module ImageImage m...
Image (1)●Go to Content management → Content types → Edit Car →Manage fields●Create new field: Photos, field_car_photos   ...
Image (2)Allowed image extensionsImage options: ALT, Title,Default image
Image (3)Go to Content management → Create content →CarPhotos 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   NameActionsNew actions                                Configure or delete action
Using Image style in Image field (1)●Go to Content management → Content types → Edit Car → ManageDisplay●Set options for P...
Using ImageCache presets in CCK (2)Create Car node and add some photos larger than 400px●    Now all images    has the sam...
Practice●Create new ImageCache preset and assign itfor field Photos in Car node type●Create new field in Story node type: ...
Summary What you should know after this stage?●Taxonomy●User management●Create custom fields for content●Create ImageCache...
Thank you for your attention                Contact:              Karol Bryksa         Email: kb@ratioweb.pl          Tel:...
Upcoming SlideShare
Loading in …5
×

Szkolenie drupal-podstawy 2

656 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
656
On SlideShare
0
From Embeds
0
Number of Embeds
243
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Szkolenie drupal-podstawy 2

  1. 1. Drupal basics Part 2
  2. 2. Training plan● Taxonomy● Users management● Creating new content types with field● Image management (image style, galleries)
  3. 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. 4. Add term to vocabulary Add termTerm nameAdvanced options:parents, synonims,related terms
  5. 5. Add vocabulary to content type
  6. 6. Create vocabularyVocabulary name: Brand
  7. 7. Add vocabulary to content type 2Advancedsettings ofvocabulary(field)
  8. 8. Create content with taxonomyTaxonomy options:Car brand
  9. 9. Create content with taxonomyTaxonomy options:Car brand
  10. 10. Taxonomy term pageTerm nameNodes assignedto term Page: taxonomy/term/1
  11. 11. Practice●Create vocabulary Color for content type Car andadd some terms (black, red, blue, silver, etc...).User must select one option.●Create vocabulary Body type for content type Carand add some terms (hatchback, coupe, etc...).User must select one option.●Create vocabulary Car Equipment for content typeCar and add some terms (ABS, Alarm, ElectricWindows, Traction Control, etc...). User can selectone or more options.●Add some Cars (nodes) and assign taxonomyoptions
  12. 12. More practice●Create content type News: enabled comments,published on front page●Create vocabulary News category and add someterms (Business, Sport, Technology, etc...). Usercan select one option●Create vocabulary News tags and enable option„Tags”●Create 5 news nodes, assign News category andad tags
  13. 13. Page taxonomy/term/TID●taxonomy/term/[TID] – display nodes assigned toterm [TID]●taxonomy/term/[TID1]+[TID2]+[TID3] – displaynodes assigned to term [TID1] or [TID2] or [TID3]●taxonomy/term/[TID1],[TID2] – display nodesassigned to term [TID1] and [TID2]
  14. 14. Term hierarchy (1)●Terms can have hierarchy (parent - children)Select parentwith drag anddrop UI
  15. 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. 16. Users – roles - permissions Roles (anonymous, authenticated, moderator, editor) Permission Users (access user profiles,(admin, joe, steve) create story content, access comments)
  17. 17. Roles●Default roles after installation ● anonymous user – all not logged in users ● authenticated user – all logged in users●You cant delete default roles●You can create unlimited number of new roles
  18. 18. Create new roleNew role namePage: admin/people/permissions/roles
  19. 19. Role permissions Set permission to role: ●create page, story, car ●delete any page,story, car ●edit any page, story, carPage: admin/people/permissions
  20. 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. 21. Users management Add new userFilter optionsUpdate optionsUsers list Page: admin/people
  22. 22. Create new user Username, e-mail and password Status – if „blocked” user cant log in Assigned rolesPage: admin/people/create
  23. 23. Users list User name Assigned roles Edit linkPage: admin/people/create
  24. 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 checkpermissions
  25. 25. Field (CCK in D6)●CCK – Content Construction Kithttp://drupal.org/project/cck (Drupal 7 has thismodule 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. 26. Using Fields Go to edit content type Car: admin/structure/types/manage/car/fieldsManage fields andManege display
  27. 27. Manage fieldsCurrent node fields(defaults). You canchange order of fields.Create new fieldUse existing fieldCreate new group of fields(http://drupal.org/project/field_group)
  28. 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. 29. Creating new field (2)RequiredHelp text, displayed under fieldon node add formFormat of text fieldDefault valueNumber of allowed valuesMinimum and maximum value
  30. 30. Creating new field (3)New field Configure and Remove linksPage: admin/structure/types/manage/car/fields
  31. 31. Creating new field (4)New field on node add pagePage: node/add/car
  32. 32. Creating new field (5)Node view page: node/[nid]Node titleFile field New field Taxonomy terms
  33. 33. Display fields (1) Label options Display formatPage: admin/structure/types/manage/car/display
  34. 34. Display fields (2)Display options:● ● Label above ● Decimal marker: Decimal point ● Scale: 2
  35. 35. PracticeCreate 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. 36. Other type of Field ●Add new field type: file upload ●Go to admin/modules and enable File moduleFile module
  37. 37. File module (1)●Go to admin/structure/types/manage/car/fieldsand add new field Field type: File
  38. 38. File module (2)Allowed files extensions File size restrictions Number of values: set to unlimited
  39. 39. File module (3) ● Go to node/add/car and add content with filesFile upload options
  40. 40. File module (4)Node view page Uploaded files
  41. 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. 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. 43. Fields: Image ●Image module provides an image upload field for Fields. ●Go to admin/modules and enable module ImageImage module
  44. 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. 45. Image (2)Allowed image extensionsImage options: ALT, Title,Default image
  46. 46. Image (3)Go to Content management → Create content →CarPhotos upload options
  47. 47. Image (4)Node view page:Uploaded photos
  48. 48. Image style● Image style page: admin/config/media/image-styles
  49. 49. Image styles (1)●Go to Site config → Image style●Add new style●Add action: Scale Action: Scale
  50. 50. Image styles (2) Preset edit options NameActionsNew actions Configure or delete action
  51. 51. Using Image style in Image field (1)●Go to Content management → Content types → Edit Car → ManageDisplay●Set options for Photos field: ● Teaser: hidden ● Full node: width400px image linked to node ImageCache preset
  52. 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. 53. Practice●Create new ImageCache preset and assign itfor 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 Photosfield_story_photos●Create new Story node and test preset
  54. 54. Summary What you should know after this stage?●Taxonomy●User management●Create custom fields for content●Create ImageCache preset and use it in CCKfields
  55. 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

×