Drupal Workshop, Part 5

Similar documents
Drupal Basics. for COS and CLASS site maintainers

Table of Contents. 11:34:59 AM]

Microsoft Windows SharePoint Services

Web Site Documentation Eugene School District 4J

A Quick Introduction to the Genesis Framework for WordPress. How to Install the Genesis Framework (and a Child Theme)

Drupal Cloud Getting Started Guide Creating a Lab site with the MIT DLC Theme

ScholarBlogs Basics (WordPress)

How to use WordPress to create a website STEP-BY-STEP INSTRUCTIONS

Figure 1 Forms category in the Insert panel. You set up a form by inserting it and configuring options through the Properties panel.

Categories In WordPress

USING DRUPAL. Hampshire College Website Editors Guide

Access Intermediate

CONTENTS. What is Moodle? Logging in to Moodle Introducing the Workspace Customising the Workspace... 8

CUPA-HR Chapters: WordPress Reference Guide

WordPress is free and open source, meaning it's developed by the people who use it.

Sitefinity Manual. Webmasters. University of Vermont College of Medicine. Medical Communications

The Courier Mail has prepared the information in this document to assist with implementation of our RSS news feeds.

How to lay out a web page with CSS

Download and Reports

CAA Alumni Chapters Websites - Admin Instructions

You will always have access to the training area if you want to experiment or repeat this tutorial.

Achieve Planner Quick Start

Content 27 September Link Status Searching by the status of a page to return Live (published), Pending (unpublished), Mobile of Offline content.

Links Menu (Blogroll) Contents: Links Widget

Getting Started Guide

Blackboard for Faculty: Grade Center (631) In this document:

Introduction to Microsoft Publisher

Getting Started with. PowerPoint 2010

Imagery International website manual

Slide 1. Slide 2. Slide 3

ORGANIZING YOUR ARTWORK WITH LAYERS

Distinction Communication Website Manual

6.3. Applying Designs CHAPTER

Using Stanford Community itunes

PURPOSE PROCESS SETTINGS

SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman

Visual Workflow Implementation Guide

HOW TO USE WORDPRESS TO BUILD A WEBSITE A STEP-BY-STEP GUIDE

Transitioning Teacher Websites

New Finance Officer & Staff Training

Wix. Using Pages Properly and Effectively

Google Sheets: Spreadsheet basics

Google Sites Guide Nursing Student Portfolio

SchoolMessenger App. Teacher User Guide - Web. West Corporation. 100 Enterprise Way, Suite A-300. Scotts Valley, CA

Enhancing PDF Documents - Adobe Acrobat DC Classroom in a Book (2015)

Unit 1: Working With Tables

Logi Ad Hoc Reporting System Administration Guide

Office 365 for Business Basics

GW Box User Guide. Have additional questions? Visit community.box.com for more information and training resources. Contents... 1

Starting Your SD41 Wordpress Blog blogs.sd41.bc.ca

Pages are static content, generally linked in your navigation. They are used for things like your about page and contact page.

Parish . User Manual

SchoolMessenger App. Parent and Student User Guide - Website. West Corporation. 100 Enterprise Way, Suite A-300. Scotts Valley, CA

This Tutorial is for Word 2007 but 2003 instructions are included in [brackets] after of each step.

Compliance Document Manager User Guide

Handout created by Cheryl Tice, Instructional Support for Technology, GST BOCES

introduction what you'll learn

Make Your Documents Accessible Worksheet (Microsoft Word 2010)

Architectural Engineering Senior Thesis CPEP Webpage Guidelines and Instructions

Tyler s Versatrans e-link User s and Administrator s Guide

ARU ARUP Gateway P Gateway. ARUP Gateway. ARUPLab.com

Lightning Knowledge Guide

Introduction to Cascade Server (web content management system) Logging in to Cascade Server Remember me Messages Dashboard Home

ListPro. Users Guide and Reference. Ilium Software. for Windows PCs, Windows Mobile, and iphone. Version 5.1

Microsoft Office Word. Part1

OU Campus Training. Part 2

Microsoft Word Introduction

Ninja Menus extension for Magento 2

Site Owners: Cascade Basics. May 2017

Group Microsite Manual. A How-To Guide for the Management of SAA Component Group Microsites

ekaizen Lessons Table of Contents 1. ebook Basics 1 2. Create a new ebook Make Changes to the ebook Populate the ebook 41

Moving graphic examples are included on some pages. To view them you need the Flash plugin on your

Roxen Content Provider

SeaMonkey for PC. Getting Started Adding Links Adding Colors, Images, and Style Loading into D2L

Basic CMS User Guide

A Quick-Reference Guide. To access reddot:

SchoolMessenger App. Teacher User Guide - Web. West Corporation. 100 Enterprise Way, Suite A-300. Scotts Valley, CA

Set Up and Manage Salesforce Communities

Moving from FrameMaker to Blaze: Best Practices

Classroom Blogging. Training wiki:

Multiple Variable Drag and Drop Demonstration (v1) Steve Gannon, Principal Consultant GanTek Multimedia

Making a phonebook. IMCOM Enterprise Web Version 1.3 PAGE 1

LionMail. for Administrative Assistants

For those working on setting up Super Star Online for the school year, here are a few tips:

Logi Ad Hoc Reporting System Administration Guide

FILE ORGANIZATION. GETTING STARTED PAGE 02 Prerequisites What You Will Learn

Customizing FrontPage

SchoolMessenger App. Parent and Student User Guide - Website. West Corporation. 100 Enterprise Way, Suite A-300. Scotts Valley, CA

Chapter11 practice file folder. For more information, see Download the practice files in this book s Introduction.

Logging Into Your Site

WordPress Tutorial for Beginners with Step by Step PDF by Stratosphere Digital

NWIC EDITOR GUIDE August 2016

SoftChalk 10. Level 1. University Information Technology Services. Learning Technologies, Training, Audiovisual, and Outreach

Creating a Course Web Site

Box User Guide. Contents

Math Dr. Miller - Constructing in Sketchpad (tm) - Due via by Friday, Mar. 18, 2016

USING POWERPOINT IN THE CLASSROOM LESSON 1 POWERPOINT BASICS

Chapter 6: Creating and Configuring Menus. Using the Menu Manager

Creating Simple Links

ITaP Confluence Guide. Instructions for Getting Started with Confluence a Purdue

Transcription:

30 April 2010 TECHNOLOGY TRAINING Drupal Workshop, Part 5 Menus, Blocks and Books T E C H B R I E F I N G Instructor s Name: Sharon L. Krossa Instructor s Email: skrossa@stanford.edu Instructor s URL: http://drupaltraining.stanford.edu My URL: (last updated: 4/30/10) Information Technology Services techtraining.stanford.edu 650.723.4391 30 April 2010 Drupal Menus, Blocks & Books Page 1 of 12

This handout accompanies classroom instruction provided by IT Services Technology Training, Stanford University. While it is not intended as a stand-alone tutorial, it may be helpful in reviewing the topics covered in class. Copyright IT Services Technology Training 2010 Stanford University All rights reserved Information Technology Services 30 April 2010 Drupal Menus, Blocks & Books Page 2 of 12

Menus, Blocks & Books (Oh, my!) Regions and Blocks...5 Free-form blocks...5 Menus...7 Creating a menu...7 Adding a menu item (method 1)...7 Adding a menu item (method 2)... 8 Displaying a menu... 8 Books... 9 Configuring the Book module... 10 Creating a book... 10 Adding a new page to an existing book... 11 Adding an existing page to an existing book... 11 Re-ordering a book...12 Automatic book menu...12 30 April 2010 Drupal Menus, Blocks & Books Page 3 of 12

This page is intentionally blank. 30 April 2010 Drupal Menus, Blocks & Books Page 4 of 12

Regions and Blocks Drupal pages are composed of various regions. Each theme (visual design) defines its own regions. To see what regions have been defined for the current theme, go to the Blocks administration page (aka Block overview page) at Administer->Site building ->Blocks (admin/build/block) Every theme will have a content region, for the main content of a page, whether the page is displaying the content of a single full node or the page display of a view. All the other regions are optional and used to display the rest of the information that makes up the web page, including any headers, footers, menus, and the like. With few exceptions, the information that appears in these other regions is in blocks. Drupal has three types of blocks: menu blocks, free-form blocks, and module-provided blocks. (The block display for a View is a special case of module-provided blocks.) The Blocks administration page is where all of these kinds of blocks are configured for: Block title (overrides default title of block, set elsewhere) User-specific visibility settings Role-specific visibility settings Page-specific visibility settings For module-provided blocks, there are often additional configuration settings. This is also where you set which region a block should appear in, if any. Note: Always configure a block before setting its region. This avoids a block appearing on pages where it shouldn t, or to users who shouldn t see it, before you ve configured it. Because each theme defines its own regions, and because not all themes have the same regions, block settings are per theme. For example, you can set a block to appear in the left sidebar in the Stanford theme but in the right sidebar (or not at all) in the Garland theme. Free-form blocks The Blocks administration page (aka Block overview page) at Administer-> Site building->blocks (admin/build/block) at is also where free-form blocks are created and their content edited. To add a new block, click the Add block tab. In the Block description field, enter the name of the block that will be listed on the Blocks administration page. Only site staff with the administer blocks permission will ever see this name and description, so clear is better than brief. In the Block title field, enter the title of the block that should be displayed on the web page to users. A title is optional and may be left blank. 30 April 2010 Drupal Menus, Blocks & Books Page 5 of 12

In the Block body field, enter the content for the block. This can include HTML, links, images, and so on (if allowed by the Input format). Select the desired setting for Custom visibility settings in the User-specific visibility settings section. Most of the time this will be Users cannot control whether or not they see this block. If you want only certain roles to see the block (for example, only SUNet users or only Anonymous users), select (enable) those roles under Show block for specific roles in the Role specific visibility settings section. If you want everyone to see the block, leave all roles unselected (disabled). If you want the block to appear only on certain pages, set Show block on specific pages to Show on only the listed pages in the Page-specific visibility settings, and then enter the Drupal paths of the pages where it should appear into the Pages field, one path per line. The Drupal path is the part of the URL after the URL for the front page of the site. For example, if the URL for the page is http://www.stanford.edu/group/example/cgibin/exampledrpl, then the Drupal path for the page at http://www.stanford.edu/ group/example/cgi-bin/exampledrpl/foo/bar is foo/bar The asterisk(*) character can be used as a wildcard. For example, to show a block not only on the foo/bar page but also on every page with a Drupal path that starts foo/ bar/, enter: foo/bar foo/bar/* To show a block everywhere except on certain pages, select Show on every page except the listed pages and enter the paths into the Pages field as above, only this time listing where the block should not appear. To show a block everywhere, select Show on every page except the listed pages and leave the Pages field empty. Tip: To get the most advantage from the wildcard feature, plan your URL conventions carefully in advance. When done, don t forget to click the Save block button. The new block is now listed on the Blocks administration page under Disabled. It won t show on any pages until you select a region from the drop-down list next to the block name & description. Alternatively, you can grab the crossed arrows next to the block name & description and drag it to the appropriate region in the list. You can enable or rearrange multiple blocks before clicking the Save blocks button, but remember to save to before moving to another page! The new block should now be visible in the region selected. To edit a free-form block, return to the Blocks administration page and click on the Configure link in the Operations column. Note: If you click on the Delete link in the Operations column, the block and its contents will be deleted completely. There is no undo. Instead of deleting free-form blocks, disable them by dragging them to the disabled section of the list or selecting <none> from the drop down list in the Region column. 30 April 2010 Drupal Menus, Blocks & Books Page 6 of 12

Menus Creating a menu As with free-form blocks, where and to whom a menu appears is configured from the Blocks administration page at Administer->Site building->blocks (admin/build/ block). But unlike with free-form blocks, menus are created and their content is edited elsewhere. To create a new menu, go to the Menus administration page at Administer->Site building->menus (admin/build/menu). Click the Add menu tab. In the Menu name field, enter the computer name for the menu. This name must be unique and can contain only lowercase letters, numbers, and hyphens. In the Title field, enter the human name for the menu. This can contain capitalization, spaces, and so on. This title will be displayed to users unless a different title (or <none>) is selected in the block configuration settings for the menu from the Blocks administration page. In the Description field, enter a description of the menu. This will only be shown on the Menus administration page, and so only seen by site staff who have the administer menu permission. The description should be detailed enough so it is clear to future administrators what the purpose of the menu is. Click the Save button. After saving a menu (whether newly created or just edited), Drupal returns to the List items page for that menu. This page can also be accessed by going to Administer->Site building->menus (admin/build/menu) and clicking on the link for the relevant menu. Since we just created this menu, there are no items listed. There several ways to add items to a menu. Adding a menu item (method 1) The first is to click the Add item tab on the List items page for your chosen menu. In the Path field, enter either an internal Drupal path or an external URL starting with http:// (Remember, the Drupal path is the part of the URL after the URL for the front page of the site. For example, if the URL for the page is http://www.stanford.edu/ group/example/cgi-bin/exampledrpl, then the Drupal path for the page at http:// www.stanford.edu/group/example/cgi-bin/exampledrpl/foo/bar is foo/bar) To link to whatever page is set as the front page of the site, enter <front>. In the Menu link title field, enter the title that will appear in the menu for the link. In the Description field, enter the text, if any, that you want to be displayed when hovering over the menu item. Leave the Enabled option enabled (checked), but remember that this setting is here. 30 April 2010 Drupal Menus, Blocks & Books Page 7 of 12

Instead of deleting a menu item, you can just disable it. Enable (check) the Expanded option if you want any children of this menu item to always be displayed. Leave it disabled (unchecked) to have any children only show up when on that link s page (or its children). The Parent item drop down list will already be set to the top level of the current menu. Leave it as is or change as appropriate (either to a menu item lower on the current menu tree or even to a completely different menu). The Weight setting determines the order of items listed in the menu. It can be set here, but is easier to set using drag and drop on the List items tab page. Click the Save button. Adding a menu item (method 2) Another way to add an item to a menu is to edit the node the menu item should link to. If you go to Administer->Content management->content (admin/content/node), there is a list of all the nodes for the site. Click on the title for one of the nodes with Basic page in the Type column. Click on the Edit tab. Click on Menu settings to expand that section. In the Menu link title field, enter the text that should appear in the menu for this item. (If left blank, no menu item will be created.) Often this will be the same as the Title for the node. From the Parent item drop down list, choose the menu (or one of its children) where this item should appear. Again, Weight can be set here, but it is easier to use drag and drop on the menus List items tab page. Scroll down and click on the Save button. Return to the Menus administration page at Administer->Site building->menus (admin/build/menu) and click on the link to the relevant menu. Notice the menu item you just added is listed. Grab the crossed arrows to drag and drop to change the order of the items. Don t forget to click Save configuration or any changes to the order will be lost! Displaying a menu We ve added a menu and populated it with some items, but you ll notice it isn t showing up anywhere. To actually display the menu: Go to the Blocks administration page at Administer->Site building->blocks (admin/ build/block) Find your new menu listed in the Disabled section and click on its configure link. Make any desired adjustments to the Block title and visibility settings, then click the Save block button. 30 April 2010 Drupal Menus, Blocks & Books Page 8 of 12

Again find the menu listed in the Disabled section, then select the desired Region for it from the drop down list. Click the Save blocks button. Your menu should now appear (but only on the pages and for the people specified). Tip: It is usually better and easier to add or edit links to nodes by editing the node settings, rather than adding or editing the item in the menu settings. Not only does this sidestep having to look up or remember the node s Drupal path, but it also makes sure that the node s menu settings and the menu s item settings stay in sync. (Node menu settings are overridden by any direct menu settings you create.) An exception is when you want a link to a single node in two different menus. In that case, only one may be set by editing the node. The other must be set from the menu settings. Books Book is one of the optional modules that comes with Drupal core. It enables you to organize content into hierarchal, book-like structures or outlines, with automatically added navigation that makes it easier to read pages in sequence. Adding the Book module Just as with contributed modules, there are 4 steps to adding an optional core module to a Drupal site: Install the module Enable the module Set permissions for the module Configure the module The only difference between adding an optional core module and adding a contributed module is that first step. Installing the module occurs automatically when you install Drupal. For the Book module, these 4 steps look like this: 1. Install the module This has already been done when Drupal was installed 2. Enable the module Go to Administer->Site building->modules (admin/build/modules) In the Core optional section, enable (check) Book. Scroll down to the bottom of the page and click the Save configuration button 30 April 2010 Drupal Menus, Blocks & Books Page 9 of 12

3. Set permissions for the module Go to Administer->User management->permissions (admin/user/ permissions) Scrolling through the list and/or using the browser s Find/Search, we find the Book module section towards the top of the list. Enable (check) Access printer-friendly version, Add content to books, Administer book outlines, and Create new books for the Zite Admin role. Keep scrolling down the permissions page, keeping an eye out for unchecked boxes in the Zite Admin column. Zite Admins should have all permissions except for those that include the terms PHP or delete. In the node module section, we find several new permissions that should be enabled for Zite Admins: º º create book content º º edit any book content º º edit own book content Scroll down to the bottom of the page and click the Save permissions button. 4. Configure the module Go to Administer->Content management->books (admin/content/book) Click the Settings tab. In the Allowed book outline types section, enable (check) the content types you will allow in books. For our example, this would be Basic page, Book page, and Story. We could enable Change entry too, but I don t anticipate organizing To-Do or Done change into outlines. In the Default child page type section, I recommend selecting Basic page instead of Book page. This is because I m going to have us delete the Book page content type. For most purposes, book pages aren t any different from the sites default Basic page, so there is no need to have a special content type for books. (It just adds to the number of content types that need to be maintained, with no significant benefit.) Click the Save configuration button. To delete the Book page content type, go to Administer->Content management ->Content types (admin/content/types) Click the Delete link in the Operations column of the Book page row. Drupal will ask if you re sure you want to do this, and you are, so click the Delete button. Creating a book To create a book, you simply add or edit a node. The book settings for a node can be set either by clicking the Outline tab or by clicking 30 April 2010 Drupal Menus, Blocks & Books Page 10 of 12

the Edit tab for the node and then clicking Book outline to expand that section. In either case, use the Book drop down list to select <create a new book>. The Weight setting determines the order of pages within a book or book section. It can be set here, but is easier to set elsewhere using drag and drop. If in the Outline tab, click on the Add to book outline button, or if in the Edit tab, click on the Save button. Now there are additional links at the bottom of the page content: Add child page and Printer-friendly version. Adding a page to an existing book The easiest way to add a page to an existing book is to navigate to the intended parent page and click on the Add child page link. (Only site staff with appropriate permissions will see this link.) Then fill out the form as for any other node. Notice that the settings in the Book outline section are already appropriately configured for both Book and Parent item. Scroll to the bottom and click the Save button. Notice that there are now additional links at the bottom of the page: Up and a link to the preceding page in the hierarchy. If there was a page after this one in the hierarchy, there would also be a link to it. Click on the Up link. Notice that there is now an automatically generated list of the node s child pages after the content of the page. Add some more child pages. Tip: Books can have multiple nested sections (that is, child pages can have child pages of their own). Adding an existing page to an existing book Using the Add child page link creates a page with the content type set for Default child page type in the general book settings. But any content type allowed in the general book settings can be added to a book. Simply create a node of the desired content type (or go to an existing node you wish to add to the book outline), then either click the Outline tab for the node or click the Edit tab for the node and then click Book outline to expand that section. In either case, use the Book drop down list to select the relevant book. Use the Parent item drop down list to select the parent item for the current node. Again, the Weight setting determines the order of pages within a book or book section. It can be set here, but is easier to set elsewhere using drag and drop. If in the Outline tab, click on the Add to book outline button, or if in the Edit tab, click on the Save button. 30 April 2010 Drupal Menus, Blocks & Books Page 11 of 12

Re-ordering a book As mentioned, the Weight settings of book pages determines their order, but it is much easier to order books by going to Administer->Content management->books and clicking on the Edit order and titles link for the relevant book. By grabbing the crossed arrows, you can drag and drop pages in the book to reorder them. You can even change the parent-child relationships and change the page titles. Don t forget to click the Save book pages button when you re done! Automatic book menu The Book module includes a module-provided block, Book navigation. This block is an automatically generated menu for books -- no need to enter menu information item by item or node by node! To configure and display the Book navigation block, go to Administer->Site building ->Blocks (admin/build/block). Find Book navigation in the Disabled section and click on its Configure link in the Operations column. The settings options for this block include all the default block settings (title and visibility settings), plus Book navigation block display. The choices for Book navigation block display are Show block on all pages Show block only on book pages The Help text for the setting explains these pretty well: If Show block on all pages is selected, the block will contain the automatically generated menus for all of the site s books. If Show block only on book pages is selected, the block will contain only the one menu corresponding to the current page s book. In this case, if the current page is not in a book, no block will be displayed. For now, select Show block on all pages. Click the Save block button. Next, select a region in which to display the Book navigation block (using the drop down menu in the Region column), then click the Save blocks button. Notice the default Book navigation title used for the block. Now go back to the Blocks administration page and configure the Book navigation block to Show block only on book pages. Notice that the block no longer shows on the front page, but if you go to a page in the book, it appears, using the book s title as the block title. Now, that wasn t nearly so scary as lions and tigers and bears, was it? 30 April 2010 Drupal Menus, Blocks & Books Page 12 of 12