Drupal documentation

From Stadm
Revision as of 16:05, 22 November 2010 by 128.111.236.64 (talk)
Jump to navigationJump to search

Documenting procedures on using Drupal to create the new ERI website

Creating News Items and a News List

  • Drupal does not have existing news content type
  • Need a content type for Date and PI
  • use View to format blocks and pages

The steps I followed:

  1. Create a content type of 'news'
    1. Login as Site Admin
    2. Go to Administer/Content Management/Content Types, click Add
    3. Name: News, Type: news (try to use all lower-case for the type), Description: News articles submitted by administrative students
    4. Workflow setting: Check 'Published', Disable 'Comments'
    5. Save the content type
  2. Add custom fields
    1. click on 'Manage Fields'
    2. Add in specific field labels and names for 'News', in this case, I created 3 custom field types: Date, PI, URL
    3. You can set the size of the text field and whether it is required or not
  3. Add some news
    1. click on 'Create Content' link and create some news items
  4. Create the default view in the VIew module
    1. go to Adminster/Siting building/Views
    2. click add to create a new View
    3. View name: News_list, View description: listing of recent news, View tag: News, View type: Node, Click Next
    4. Click on the '+' sign next to Fields. Scroll down and select Content: Date, Node: Title, Content: PI and click on the add button.
    5. For Content:Date, select Widget label (Date), and leave the rest to default
    6. For Node:Title, remove the label of 'Title' (clear the text). Check the box 'Output this field as a link' and check 'Link this field to its node'
    7. For Content: PI, select Widget label (Date), and leave the rest to default
    8. Click the '+' sign next to Filters. Check Node: Published and Node: Type. These options let us choose to display only Published content (Node: Published=Y) and only news (Node: Type='news') then click add
    9. For Node:Published, click 'yes' for published item
    10. For Node:Type, select 'Is one of' and check 'News'
    11. Now let's sort the news items by most recent first (descending order) Click on the '+' sign next to Sort criteria
    12. Check Content:Date and click add
    13. Select descending and click update
  5. Create the page view in the View module
    1. Select page under the Defaults and click Add Display
    2. In the Basic setting, change the Name to news_page, Title; Recent News, Style: Table, Item to display: Unlimited (type 0)
    3. Then check sortable for Fields: Date, Title, PI and select the Default sort to be Date
    4. Check 'Override normal sorting if click sorting is used' and select Default sort order to be Descending
    5. In the Page setting, make the changes to 'Path: news' and 'Menu: Normal: news' and select Menu to be Primary Links
    6. Click update and save
  6. Create a block for the most recent 5 news to display on the homepage
    1. Select block under the Defaults and click Add Display
    2. In the Basic setting, changethe Name to news_block, Title; Recent News, Style: Table, Item to display: 5, More Link: Yes
    3. click update and save
    4. Go to Site Building/Block,
    5. Scroll down to the list of inactive blocks and find the one named ‘news_list: news_block’. This is what we created when we built our view in the previous steps. Click on the dropdown box and select ‘content bottom’ (depending on where you want to place the block).
    6. Click on configure for 'news_list: news_block'. Scroll down to ‘Page specific visibility settings’ and click on ‘Show on only the listed pages’ and type <front> in the text box.
    7. Click the ‘Save blocks’ button at the bottom of the page.

Panel issues

  • inserted images did not show up
    • fix - need to select "Full Html" rather than "Filtered Html" in "Input Format"

Custom fields of content type issue

  • the custom fields of a content type did not show up when I tried to create a new content of this content type
    • fix - need to enable permissions of these fields in the User Management-Permissions