[DCTPE2011] Drupal 7 的Fields/Views 運用
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

[DCTPE2011] Drupal 7 的Fields/Views 運用

on

  • 2,101 views

 

Statistics

Views

Total Views
2,101
Views on SlideShare
2,101
Embed Views
0

Actions

Likes
0
Downloads
7
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

[DCTPE2011] Drupal 7 的Fields/Views 運用 Presentation Transcript

  • 1. Drupal 7 beginner tutorial Contents, content types, fields and views Cedric Chaux , Chris
  • 2. What do you need ?
      • Drupal 7 basic installation including Field , and Field UI module ( enabled by default to the core )
      • Drupal module : Views ( Views_ui need to be enabled )
      • dependencies module : Ctools
      • Where to get them ? 
      • http://drupal.org/project/drupal
      • http://drupal.org/project/views
      • http://drupal.org/project/ctools
  • 3. Practice website.
    • In order to follow this tutorial it would be better if you could connect to the Drupal 7 website I created for the demo  using your laptop.
    •       URL : http:// …
    •       login : 
    •       password : 
    • Are you ready ?
  • 4. Introduction 
    • Drupal is a C MS : Content management system.
    • You have to let Drupal know how to use your content and it will do the work for you.
    • Why Drupal 7 ?
    • Someday you'll have to learn it.
    • Is it ok to use ?
    • It's a pretty recent but stable release. It recently have been updated to correct a security issue.
    • Mistakes I made when I learning Drupal ( 6 ): I didn't try to understand content type. Result : Always tried the hardest , most unstable solution : There are often many ways to do the same things in Drupal.
    • Drupal contents are nodes . node is like atom for matter.
    • Why to start with content ? not menu , blocks , or users ?
      • Everything in Drupal is about content.
  • 5. What do you need to know about contents ?        
    • As a Drupal user, this is the first basic thing you will need to do :
    • Manage your content
    • Add
    • Edit
    • Delete
    • Publish.
  • 6. Nodes and contents 
    • Basic information structure.
    • All contents have a title . This is not a field. It has many different usage. 
    • Basic content have a field : the body ! 
      • Display content : Teaser of content or full view ? Why does it matter ?
      • Text format : Plain text , simple HTML or full HTML code ? 
  • 7. Content settings
    • Menu  
    • Where to display the content in the menu. 
    • Revision
    • Manage and keep the different versions of your node.
    • url
    • Choose the for the page of your content , basic url use node/[id]
    • Comment
    • let other users add comments to your content
    • Authoring
    • Who created the content and when ? 
    • Publish
    • Is the content available on the website ?
  • 8. Why do you need Content type ?
    • Content types are like templates for contents.
    • Think of Letter templates on your favorite word processor.
    • Would you like to type 100 times the same information when you only need to enter your name ?
    • Manage the content types : a more advance task
      • Add information > Fields
      • Settings and Display
      • Organize > View
  • 9. Basic content type
    • Page
    • Article ( called story in Drupal 6 )
      • most simple Content type :
        • life cycle ( Published / Unpublished )
        • Only one field.
  • 10. Advanced type of content in Drupal    
    • Comment content type
    • For static content , no need to be modified. Comes from node module directly.
    •  
    • Blog entry
    • Time sensitive content ( updates , news , post ).
    • Book page
    • hierarchically organized content ( index , help , documentation , guide )
    • Forum topic
    • Available when enabling forum module. Integrated to forum module functionalities
    •  
    • Poll
    • Available when poll module is enabled. Description of a poll. Integrated to poll module.
  • 11. Content type settings
    • Similar to content settings : However content type settings will apply to every content that will be created with this content type.
    • Warning ! Some of the setting cannot be changed on individual nodes.
  • 12. Basic content types are not enough.
    • Why would I need more special content  when I can create anything with a simple page ?
      • Other people will add content too.
      • I want the content to contain specific information.
      • I want to do something special with my content.
    • Example : Biography
      • What do I need ?
      • People must provide a picture.
      • I need to know something specific about their diploma and their specialty.
  • 13. Biography content type
    • Then what should I do ?
    • Create a new content type.
      • When adding a biography I will choose this content type .
    • How to add more information to my content type ?
      • Create new fields corresponded to the information you want to add.
    • What is a field ?
      • Additional specific type of information attached to content type.
  • 14. Choice of field
      • File ( any )
      • Image ( large , medium , thumbnail ) 
      • Boolean 0 1
      • Decimal
      • Float  1.1111231213
      • Integer 1 2 3 ... 
      • List ( Create your own ) 
      • Long text
      • Long text + summary ( like body )
      • Taxonomy ( associated to tag ).
  • 15. How to adds content with fields ?    
    • A widget let you decide how users are going to enter the data when adding new field. You can choose the most suitable widget.
    • Each fields type has its own widgets.
  • 16. Let's create a content type !    
    • Biography  
      • We will need 
      • Your name ( title )
      • Body ( your resume )
      • A Picture
      • Your diploma ( list )
      • Your specialty ( tag )
    • Do not save your content type, we only need one content type.
  • 17. Let's create a biography content
    • Each of you will now create their own biography using the Drupal content menu.
    • We will use these contents in order to create a very simple view.
  • 18. View    
    • Now we have a lot of biographies. 
    • Thanks to view , users will be able to navigate through all these contents.
    • A view is basically a page that allow you to display a list of content. It's an overview of contents.
    • In views , content fields become extremely useful since it allows you to play around with your information.
    • You get to decide what do display and how to display it.
    • Since you have a lot of possibilities to display content , there are many many views parameters. Don't be scared ! 
  • 19. Do we need a view for biographies ?
    • We do have many biographies now on our website.
    • Putting all of them on a menu would be messy...
    • We do not want biographies to appear on the front page
    • Therefore we need a view to display our biographies.
    • We will need to 
      • Give a name to the view
      • Decide how the view will be shown ( format )
      • Decide which fields we want to show.
      • Tell the view what type of content we want to see ( filter )
      • Tell the view how to arrange the content ( sort )
  • 20. User mistakes ...
    • If I want to sort the view by surname , how to I know from the title which part of the title field is the name.
    • Some of you might have wrote Surname / First name or Family Name / First name , or even only your First name in the content title.
    • We decide the title , is the main description of the user.
    • We are going to create two new fields : First name , Last name as text in the content type. 
    • We are also going to change the label for title , so it reflect the meaning : Activity Description.
  • 21. Updating the view        
    • Now that we have updated our content. We need to change the  view to insert the new fields and use them to sort our content.
    • We will add two fields : "Family name" and "First name" to the view and place them after the picture.
    • Now create a clone of bio view , and have fun with it using the update preview button if there is enough time left. Try to sort the view by content
  • 22. Thank you !
    • You should have a lot of questions to ask now ...