Drupal/C3/Menu-and-Endpoints/English
Title: Menu and Endpoints
Keywords: Drupal, Video tutorial, URL paths, Pathauto, Token, Menu, System, Content
|
|
Slide 1:
Menu and Endpoints |
Welcome to the Spoken tutorial on Menu and Endpoints. |
Slide 2:
Learning Objectives
|
In this tutorial, we will learn to set up URL Patterns.
|
Slide 3:
System requirement
|
To record this tutorial, I am using
You can use any web browser as per your choice. |
00:18 | In this tutorial, we will talk about the process of creating proper URL paths for our website. |
Slide | Endpoints and aliases.
|
Slide |
|
Slide |
|
Let us now create URL patterns that will apply to all the contents we have. | |
00:30 | Setting up URL paths require three modules. |
00:35 | Those three modules are the Pathauto, Token and CTools. |
1:03 | Pls go ahead and get the Pathauto installed on your machine. |
1:06 | Come back to the Pathauto project page.
|
1:22 | Install Token and CTools.
|
1:29 | Once we have done that, we are ready to go. |
1:33 | Click on Configuration.
|
Click on Patterns >> Add Pathauto pattern | By default, there are no URL aliases available.
|
Click on Pattern type drop down >> point to the options | Click on the Pattern type drop down.
|
Click Content >> Path pattern field | For example, I will select Content.
|
Template variables are called as tokens.
| |
Point to Browse available tokens | Token module provides these variables.
|
Click Path pattern box >> Type content/. >> Click Browse available tokens | Click on the Path pattern box where you want to insert a token.
|
A popup window opens up to show the Available tokens. | |
Point to Nodes | Suppose we want a pattern like content/[title of the page]
|
Click on the right arrow | Click on the right arrow button of the Nodes section. |
Choose token [node:title] | Choose the token [node:title] which will be replaced by the Title of the page.
|
Select token | If this does not happen, make sure to click on the box and position the cursor as required.
|
Point to Content type | Under Content type, we can select to which entity type this pattern should be applied.
|
This setting can also be overridden for a particular type.
| |
Label field>>type Content Title, >> click Save | In the Label field, type Content Title, then click on the Save button.
|
This pattern will be applied to generate URL aliases for all newly added content.
| |
Click Bulk generate >> select Content type >> click on Update | To apply it for the existing contents, click on the Bulk generate tab.
|
It is started generating the URL aliases.
| |
Click List | Now click on the List tab.
|
Each node on our site has a system path of /node/nodeid.
| |
Scroll and show all the aliases | We can see that all the aliases follow the same pattern.
|
Slide | Use the following thumb rules to create patterns.
|
Click on Settings >> point to the options | There are more options available to control the URL alias pattern in the Settings tab.
|
Scroll to show | We also see that by default several common words are removed from the pattern.
|
3:16 | To summarise -
Pathauto and Token modules allow us to
at any time. |
3:29 | From now onwards, every new node will use the patterns that we have established. |
00:05 | Now, we will talk about the Menus. |
00:07 | We have been adding menus to our site, in a random order, mostly based on the Views and basic pages. |
00:18 | Now, let’s see how we can manage the menu system. |
00:22 | Go to Structure, scroll down and click on Menus. |
00:28 | We have a number of different menus here that comes with Drupal, by default.
|
00:34 | We are interested in the Main navigation menu.
|
00:41 | Here we will be able to click and drag and re-order our Menu links. |
00:48 | Let’s drag Home and Upcoming Events to the top. |
00:54 | You can re-order these, in any way you want.
|
1:01 | Now we have got Events and Upcoming Events.
|
1:12 | That’s pretty simple.
|
1:19 | Notice that now, we have got four menus. |
1:23 | Where did our Event sub menu go? |
1:27 | Please remember, not all themes in Drupal support sub menus or dropdown menus.
|
1:40 | For now, go back to Structure, Menus and edit the Main menu.
|
2:16 | What if we need a link to a particular node or to a particular section of our site? |
2:36 | For instance if I wanted a menu link for my Forums, I would first go back to the site. |
2:41 | Go to the Forums page and copy the actual URL, which is just /forum |
2:53 | Then come back over and click on Edit menu and then on Add link. |
2:58 | Give it a title called Forum and paste the copied link. |
3:03 | If you are looking at a specific piece of content, just type a letter like F or G.
|
3:15 | Say for instance if we type an a , all the nodes that have a in the title, will show up. |
3:22 | We can just select the one we are looking for and it will tell us that its node id number 1. |
3:28 | If we want an internal path, such as the ability to add a node, then it would be /node/add. |
3:36 | If we want to link it to the Homepage, it will be front.
|
3:51 | Click Save and now we have a link to the Forum |
3:58 | Click Save.
Let’s just double check if that works and indeed it does. |
4:06 | So play around a little bit, to understand it better.
|
With this we come to the end of this tutorial. | |
Slide 5:
Summary
|
Let us summarize.
|
Slide 6:
Acknowledgement |
This video is
|
Slide 7:
Acknowledgement
|
The video at this link summarises the Spoken Tutorial project.
|
Slide 8:
Spoken Tutorial Workshops
|
The Spoken Tutorial Project Team conducts workshops and gives certificates.
|
Slide 9:
Acknowledgement |
Spoken Tutorial Project is funded by
Government of India. |
This is Calvin Nikhil Tomy signing off.
|