Chapter 5: Basic Page Management
- Concept: Paths, Aliases, and URLs
- Creating a Content Item
- Editing a Content Item
- Designating a Front Page for your Site
- Concept: Menu
- Adding a Page to the Navigation
- Changing the Order of Navigation
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:
- node/7
- taxonomy/term/6
- admin/content/comment
- user/login
- user/3
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.
Related topics
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
-
In the Manage administrative menu, navigate to Content > Add content > Basic page (node/add/page). The Create Basic page form appears.
-
Click Edit summary.
-
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.
-
Click Preview to ensure everything looks like expected.
-
Click Back to content editing.
-
Click Save. The content is saved and can be found on the Content page.
-
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
Related concepts
- Concept: User Interface, Configuration, and Content translation
- Concept: Paths, Aliases, and URLs
- Editing a Content Item
Videos
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
Site prerequisites
A content item for the Home page must exist. See Creating a Content Item.
Steps
- In the Manage administrative menu, navigate to Content (admin/content).
- 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.
- 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.
- 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.
- Click Save to save your changes.
- You will be redirected back to the Content administrative page, and there
should be a message showing that the content item was updated.
Expand your understanding
As an alternative to the first two steps above, you can also reach the content edit form as follows:
- 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.
- 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
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
- In the Manage administrative menu, navigate to Configuration > System > Basic site settings (admin/config/system/site-information).
- 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.
- Navigate to the home page to verify that it displays content as configured by
you.
Expand your understanding
- Adding a Page to the Navigation
- Follow Creating a Content Item to create an error page to be used as a 404 (page not found) or 403 (not authorized) response on your site. Then following the steps here, you can designate it as the error response, in the Error pages section of the configuration.
Related concepts
Videos
Designating a Front Page for Your Site
Concept: Menu
What is a menu?
The core Standard installation profile contains five menus:
You can customize menus in the following ways, using the menu administration functionality:
- Creating new custom menus.
- Adding new menu links.
- Reordering menu links by setting their "weight" or by dragging them into place.
- Renaming menu links (link title).
- Changing the link description (the tooltip that appears when you mouse over a menu link).
- Moving a menu link into a different menu by editing its Parent link property.
Related topics
- Adding a Page to the Navigation
- Changing the Order of Navigation
- To display a menu, you will need to place the block that corresponds to the menu in a region of your theme; see Concept: Blocks, Concept: Regions in a Theme, and Placing a Block in a Region. The core Standard installation profile places all of the menus it defines except Administration in regions of the core Bartik theme. The core Toolbar module, which is installed by the core Standard installation profile, displays the Administration menu; it is also displayed by the contributed Admin Toolbar module.
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
-
In the Manage administrative menu, navigate to Content (admin/content).
-
Find the About page, and click Edit in that row. The content editing form appears.
-
Click Menu settings on the right to expand it.
-
Check Provide a menu link for the menu options to appear.
-
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 -
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.
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
Reorder the links in a menu.
Prerequisite knowledge
Site prerequisites
Home and About pages must exist in the main navigation menu. See Adding a Page to the Navigation.
Steps
- 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.
- The Edit menu page will display a list of each link in the menu you
chose (Main navigation).
- 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).
- Click Save.
- The home page now displays the main navigation with the Home menu
link displayed first.