18.11.2015 Views

Beginning Drupal 8

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2 ■ Creating and Managing Content<br />

You can view a previously published version of the article by clicking the date and time for a previous version.<br />

Clicking the Back button in your browser returns you to the previous page where you can click the<br />

Revert link, changing the currently published version to a previously published version. Clicking Revert<br />

causes <strong>Drupal</strong> to display a page that asks you if you really want to revert to a previously published version.<br />

Clicking the Revert button results in <strong>Drupal</strong> unpublishing the current version and publishing the<br />

selected version.<br />

Menu Settings<br />

There may be instances when a content item is important enough to list on one of your site’s navigational<br />

menus. By default <strong>Drupal</strong> creates a “Main navigation” menu. The Main navigation menu is typically<br />

displayed at or near the top of the page. I’ll cover menus in detail in Chapter 5, but for now I’ll show you how<br />

to assign your test content item to the Main navigation menu.<br />

While on the homepage of your site, hover over one of the content items you have created, click the pencil<br />

icon, and select the Edit link. Click the Menu Settings link (see Figure 2-6). The Menu Settings panel will appear.<br />

Check the “Provide a menu link” check box, and you will see four fields (see Figure 2-12): “Menu link title,”<br />

“Description,” “Parent item,” and “Weight.” In the “Menu link title” field, enter a descriptive link title for your<br />

content item (remember that this will appear in a menu, so use as few words as possible). In the “Description”<br />

field, enter the text that you wish to appear when someone hovers over that menu item. From the “Parent item”<br />

drop-down list, select “Main navigation,” where Main navigation on our site is the primary horizontal menu.<br />

You’ll see Home listed immediately below Main navigation, which is the Home link that appears in Figure 2-4.<br />

For our example, select Main navigation as the parent item, as we want our link to appear as another tab<br />

next to the Home tab that already exists. Leave the “Weight” field set to zero if you want your menu to sort<br />

alphabetically. You can override the alphabetical sort feature by selecting a weight from the list of values. The<br />

lower the number, the “lighter” the item will be on your menu. For horizontal menus, a lighter item appears to<br />

the left of a heavier item. For vertical menus, a lighter item appears above a heavier item. Setting the sort weight<br />

is useful in situations where you want, for example, the Home menu link to always appear as the first menu item.<br />

To force the Home link to the front of the list, select the lowest number from the drop-down list of values.<br />

Figure 2-12. Click the Menu Settings link and set your preferences<br />

16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!