Chapter 5: Basic Page Management

Concept: Paths, Aliases, and URLs

What is a URL?

URL is the abbreviation for "Uniform Resource Locator", which is the page's address on the web. It is the "name" by which a browser identifies a page to display. In the example "Visit us at example.com.", example.com is the URL for the home page of your website. Users use URLs to locate content on the web.

What is a Path?

A path is the unique, last part of the URL for a specific function or piece of content. For example, for a page whose full URL is http://example.com/node/7, the path is node/7.

Here are some examples of paths you might find in your site:

What is an Alias?

The core software has a feature called "URL Alias" that allows you to provide a more understandable name to the content. So, if you have an "About Us" page with the path node/7, you can set up an alias so that your visitors will see it as http://www.example.com/AboutUs. The core Path module, which supports URL aliasing, provides this functionality.

Creating a Content Item

Goal

Create and publish a content item that will be used as the home page of the site.

Prerequisite knowledge

Site prerequisites

The Basic page content type must exist. This is created on your site when you install with the core Standard installation profile.

Steps

  1. In the Manage administrative menu, navigate to Content > Add content > Basic page (node/add/page). The Create Basic page form appears.

  2. Click Edit summary.

  3. Fill in the fields as shown below.

    Field name Explanation Value
    Title Title of the page. Will also be used as a meta tag in the source code, URL alias, and as label of the content item in administration screens Home Summary Summary of the value of the body field. Can be used as teaser
    Body Full content of the page Welcome to City Market - your neighborhood
    Published Whether the content is published for public view or not Checked
    URL alias > URL alias Alternate relative path for the content /home

    By clicking the Source button in the rich text editor toolbar, you can see the HTML source code of the text that you are editing. Create a basic page

  4. Click Preview to ensure everything looks like expected.

  5. Click Back to content editing.

  6. Click Save. The content is saved and can be found on the Content page.

  7. Follow the same steps to create an About page, with title "About", and a body telling about the history of the farmer's market.

Expand your understanding

Videos

Creating a Content Item

Additional resources

Drupal.org community documentation page "About nodes"

Editing a Content Item

Goal

Update the hours on the Home page content item.

Prerequisite knowledge

Creating a Content Item

Site prerequisites

A content item for the Home page must exist. See Creating a Content Item.

Steps

  1. In the Manage administrative menu, navigate to Content (admin/content).
  2. If the content item you want to edit was updated or created recently, it should appear near the top of the content list on that page. If not, you can use the Content type, Title, or other filters to locate the content item. Content administration page
  3. Click Edit in the row of the content item you want to edit (Home), to open the content editing form. Update the opening hours in the Body field. See Creating a Content Item for an explanation of the fields and a screenshot.
  4. Check Create new revision under Published, if it is not already checked, and enter a Revision log message explaining what changes you are making (for example, you might enter "Updated opening hours"). This text will appear in the revision log for the page. Revision information section of the content edit page
  5. Click Save to save your changes.
  6. You will be redirected back to the Content administrative page, and there should be a message showing that the content item was updated. Updated content message

Expand your understanding

As an alternative to the first two steps above, you can also reach the content edit form as follows:

  1. Starting from your site's home page, use the site's navigation menus to locate the page where the content you want to edit is displayed to visitors.
  2. Most themes will display an Edit link or tab near the top of that page to people with permission to edit the page; clicking the link will take you to the full content edit form.

Videos

Editing a Content Item

Designating a Front Page for your Site

Goal

Configure which content item is displayed as the front page of your website.

Site prerequisites

The content item that you want to designate as the front page of your site must exist. See Creating a Content Item.

Steps

  1. In the Manage administrative menu, navigate to Configuration > System > Basic site settings (admin/config/system/site-information).
  2. Under Front page, replace /node with the name of the page you would like to make the home page. To use the home page that was previously created, provide its path /home. Click Save configuration. 'FRONT PAGE' area with /home in text field
  3. Navigate to the home page to verify that it displays content as configured by you. 'FRONT PAGE' with 'Home' (Basic page) content added

Expand your understanding

Concept: Menu

Videos

Designating a Front Page for Your Site

Concept: Menu

What is a menu?

Menus are a collection of links used to navigate a website. The core Menu UI module provides an interface to control and customize the menu system. Menus are primarily displayed as a hierarchical list of links. By default, new menu links are placed inside a built-in menu labeled Main navigation, but administrators can also create custom menus.

The core Standard installation profile contains five menus:

You can customize menus in the following ways, using the menu administration functionality:

Adding a Page to the Navigation

Goal

Add a page to the navigation. For example, the About page.

Prerequisite knowledge

Site prerequisites

The About page content item must exist. See Creating a Content Item.

Steps

  1. In the Manage administrative menu, navigate to Content (admin/content).

  2. Find the About page, and click Edit in that row. The content editing form appears. Page edit link

  3. Click Menu settings on the right to expand it.

  4. Check Provide a menu link for the menu options to appear.

  5. Enter values from the table below:

    Field name Explanation Example value
    Menu link title Title that will be displayed in the menu About
    Description Text that will be displayed when a visitor hovers over the link History of the market
    Parent link Location of the page in the menu hierarchy. For example, if you choose _<Main navigation>_, the page will appear in the highest level of the navigation. By choosing another menu link as parent, you can create a menu hierarchy of multiple levels. <Main navigation> Weight The order in which the page should appear in the menu (lower-weighted

    Creating a menu link from within the content edit form

  6. Click Save to save the changes. Click Home or Return to site in the navigation bar to see the result, which could look like the picture below. Link has been added to the main menu

Expand your understanding

Changing the Order of Navigation

Videos

Adding a Page to the Navigation

Additional resources

Drupal.org community documentation page "Adding a link to a menu"

Changing the Order of Navigation

Goal

Prerequisite knowledge

Site prerequisites

Home and About pages must exist in the main navigation menu. See Adding a Page to the Navigation.

Steps

  1. In the Manage administrative menu, navigate to Structure > Menus (admin/structure/menu) where all menus on your site are listed. Click Edit Menu from the Operations dropdown for Main navigation. You can also reach this page using contextual links (refer to Concept: Administrative Overview) for the menu. Note that the names and descriptions of the menus that were provided by your installation profile are shown in English on this page; see Concept: User Interface, Configuration, and Content translation for an explanation. List of menus on the site with 'Main navigation' highlighted
  2. The Edit menu page will display a list of each link in the menu you chose (Main navigation). List of menu links under Main navigation
  3. Drag the cross bar handles of menu links to change their order: Home, then About. As an alternative to dragging, you can click the Show row weights link at the top of the table and select numerical weights (menu links with lower or more negative weights will be shown first). Reordered menu links with warning message about unsaved changes and the Save button
  4. Click Save.
  5. The home page now displays the main navigation with the Home menu link displayed first. Reordered menu links on the home page with 'Home' first and then 'About'

Expand your understanding

Concept: Menu

Videos

Changing the Order of Navigation