Content
Drupal core defines several content types so you can start creating content as soon as your site has been installed. We will be using the administratiion interface for now to add and manage content until we create some more users later in the course.
Article
Use the Add Content button or link from your administration pages (you must be logged in to the site with the administration user) and select the Article content type to add an article and associated picture (which you can upload from your machine) to the website.
You can use another browser session to browse the website without logging in and view the website as a guest visitor would see it. Note that Drupal has automatically pushed the new content onto the front page.
Filtered Html
One very important part of Drupal security is the text formatting feature which prevents dangerous content from being specified on your web pages. The default setting is Filtered HTML which will allow only certain simple and safe HTML tags to be specified in your content (for example to set text to bold). Although the full content is stored in the database, Drupal will strip out any HTML which is not allowed and display only the safe HTML to the user.
The problem here is that often you need to add some HTML to specify content and it will not appear on the web page. You may change the setting for eadch node by changing the text format to Full HTML and Drupal will then send all the HTML to the web page and preserve your settings. Be careful when changing this setting for content you are not sure of because the HTML (or malicious JavaScript) will have been stored in the database and you may be enabling malicious content onto the site.
Content Settings
You can use the Find Content link at the top of the administration page to find all the recently added content and go back and edit the content and options for this note. The URL for the webpage will be something like http://drupalsite/node/6 but you can specify an alias so that the URL becomes http://drupalsite/welcome for example.
Select the URL path settings option and specify the alias you require, The page is now available with both the original node-type URL and the alias.
Menu Settings
Another option lets you set the menu option for the page so that the user can guide themselves directly there from the menus on the front page.
Comment Settings
All articles allow comments to be added by authorised users and this options can be turned off for individual pages if required.
Publishing Options
Similarly the default behaviour with regards to the front page can be modified for each individual page and a page can be created but not published if someone needs to check the content before releasing it onto the site.
Finally, take a look at the website in the guest browser and click on the Welcome menu to view the webpage.
Content Type Settings
The default settings for a node can be set globally by changing the options for the content type from the Administration-Structure-Content Types administration page if you are logged in as the site administrator. Note that this will not go back and set defaults for nodes you have already created.
Use the Edit tab to change some or all of the following according to your requirements:
-
The name of the content type and the instructions that a contributor will see if they have permissions to add this content type.
-
A second note that the contributor sees when they submit a page and the possibility to force them to preview the page before submititng.
-
Publishing options to specify whether the content is published immediately and promoted to the front page and so on. Setting a page as 'sticky' will make sure it is displayed at the top of the home page. There is also the ability to keep all revisions so a record is kept of the history for each submission.
-
Display settings specify whether the author and date/time message is shown for each post.
-
Comment settings indicated whether comments are available.
-
Menu settings can be used to create menu options.
Blog
There are two additional content types provided in Drupal Core that are easily configured from the Modules section of the administration pages. Simply click the checkboxes next to the Blog and Book modules and use the Save Configuration button at the bottom of the page to add these content types.
You can now add and configure content and the content types to create more content on the site.
Book
Books are hierarchical arrangements of content useful for manuals which are arranged into chapters. Create the title page of the book and the useCreate a New Book option in the book outline to create a new book. It might be useful to create a menu item also for this top level page of the book.
You can now add a series of book pages and specify the place in the hierarchy of chapters and sections in the Book Outline specification.
The website will automatically create the content with a previous and next link and thumbnails as appropriate.
LAB - CREATE CONTENT
Create some content of all content types on your site and view in another browser as guest user so you can see how it will look to someone browsing your site.
Remember to set different options (including the URL settings) and see how that affects the display of the content.