User Tools

Site Tools


cms2

Content Management System(Focus On Drupal), Day2

Creating a "Content type"
  1. Navigate to the Content types page (Administer > Structure > Content types).
  2. Click Add Content Type.
  3. In the Name field, add a name for the content type. The name is required. Note that if you start entering a name into the name field, a “machine name” starts showing to the right of the title. To edit the machine name, click the edit link.
  4. In the Description field, you can write a description of the content type that will show up on the Add new content page (Administer > Content > Add new content).
  5. Set your preferred default values for this content type. Content you create of this content type will have these values by default. The values can be overridden for each content created. You can specify default values for Submission form settings, Publishing options, Display settings, Comment settings and Menu settings.
  6. Do one of the following:
    1. To add the content type using only the title and body fields, click Save Content Type.
    2. You can add more fields later.
    3. To add the content type and begin adding more fields, click Save and Add Fields
Adding "fields" to "Content type"
  1. Navigate to the Content types page (Administer > Structure > Content types).
  2. In the table, locate the row that contains your content type and click the manage fields link.
  3. In the Add new field section, enter a label for the field.
  4. In the Field name field, enter the machine name for the field. You can only use numbers, lower-case letters and the underscore character (_).
  5. In the field type list, select one of the field type you want to create.
  6. In the Widget field, select a widget. The options vary depending on the field type.
  7. Click Save.
Create a Node reference
  1. Download & extract “References” module Download to sites/all/modules
  2. Goto “Modules”, check “Node Reference” and “Save Configuration”
  3. Goto “Structure” > “Content types” and click “Manage fields” on a Content type
  4. Under “Add new Field” provide the label, Choose “Node Reference” under “Field” and “Save
  5. Choose a content type to be referenced under “Content types that can be referenced”(Like choose Author when working on Book)
  6. “Save field settings” & “Save settings”
  7. Now while creating the content, you will get a Autocomplete field for the referenced Content type
To arrange order of fields
  1. Navigate to the Content types page (Administer > Structure > Content types).
  2. In the table, locate the row that contains your content type and click the manage fields link
  3. Locate the field you want to re-order, and drag the four-headed arrow icon up or down.
  4. Click Save.
To create a menu item for form
  1. Goto Structure > Menus
  2. Click on edit near Main menus
  3. Click on add link
  4. Configure the new menu item
    1. Give Menu link title as Create a event
    2. Give Path as node/add/event (event is nothing but the name of the content type you created in previous steps, so if you have created a content type called registration the path for that content type will be node/add/registration
    3. Save
Links
cms2.txt · Last modified: 2018/03/24 11:13 (external edit)