ultimate guide to druapl 8

Planning to create your next online property using Drupal 8? Our guide will help you get started and learn how to use this great software.

Introduction to Drupal

Drupal is a content management system with tens of thousands of free add-on features which contains PHP, Ajax, and Javascript and so on. Its content is stored in a database while the design is stored in a theme. Drupal has a lot of advantage and comes with a lot of built-in software.

Drupal is open source and free so you can distribute, change and you can even sell templates. Drupal has more than 97.000 volunteers making more than 2000 commits and 5300 comments.

Drupal was created by a student as a chat platform in a dorm room in 2000. In 2001, appear the first public version 1.0 together with 2.0 and 3.0. In the 2002, appeared 4.0, in 2007 5.0, in 2008 6.0, in 2011, 7.0 and in 2015 the last stable version 8.0.

Drupal has become a core management system that has add-ons called modules and themes that they can be all packed up in distributions supported by a large community.

Drupal is used by White House, by weather.com, by Harvard Universities and even Lady Gaga.

Drupal Features

Drupal has a lot of features and you can choose Drupal because it is free, open source, flexible and customizable. It is mobile ready and you can manage it from your mobile devices and fantastic for big projects such as a features rich website or enterprise websites.

druapl 8 infographic

Drupal is friendly so it is easy to use, social having multiple social media features integrated and searchable so visitors can search for specific content. It is also safe and secure being updated constantly, has themes and modules so you can extend even more and has a great community so you can ask for help.

Drupal Requirements

To use Drupal you need a browser such as Chrome, Safari or Firefox. Next, you need a domain name and a web host.

The most important resource is the plan. You need the plan to create a Drupal website so you need to think about every content type, field, taxonomy, path, display, view, feature, layout, menu, role, permissions and so on.

You need at least a database version from the following list: MySQL 5.53, MariaDB 5.5.20, Percona Server 5.5.8 with PDO and an InnoDB compatible primary storage engine, PostgreSQL 91.2 with PDO or SQLite 3.6.8.

The PHP version should be 5.5.9 and you should have PDO activated while magic_quotes_gpc, magic quotes_runtime and safe_mode should be turned off.

Drupal Installation

First, you need to download and get started by download it from the developers website where it is available as a zip archive. You now just need to upload it and extract it. Select all files and move them to the root.

The next phase is to create a database using Cpanel. There you need to put a database name, a username and a password. You should connect your user with your database.

Next, you go to your website link, you choose a language and you choose the standard installation profile. Here you can see your requirements and notes. You can click continue and write the database configuration and then save and continue.

Now Drupal is installing quickly and then you just configure your website. You can enter the site name, site email address and create an account maintenance account such as username, password, email address, default country and default time zone. You can check for updates automatically and receive an email notification if you want them.

Next, you just need to press the continue button and you will be redirected to your website.

This is the manual installation, however, there is an automatically one available at your cPanel using Softaculous which creates all the steps excluding the last one where you configure your website.

Recommend: Find the best Drupal Hosting provider.

The Basics of Drupal

Once you installed Drupal you can see that you are user number 1 and the super-user. This is the primary administrator user of Drupal and he has complete control and access over Drupal. Super user’s access and control cannot be revoked while other users, even other administrator’s access can be revoked.

When you are logged into your website you can see the administration toolbar at the top of your website at Manage button, where multiple options are available. The first option is content where you create your content, the next is structure where you can see your website structure and the third is appearance where you choose the design of your website.

The next option is extend what is useful to search for modules which offer additional features, then comes the configuration, what is the option for multiple settings for your website and the next is users, what is the place where you manage user and user permissions.

The last two options are reports and help. Reports is a useful page where you can see statistics regarding your website, while help is where you can see documentation regarding Drupal.

There is a shortcuts button and another button with your username. You can create shortcuts using stars so you access quickly and easy any administration screen. The button which has your username is actually your profile button where you can log out or edit your personal information.

When you click on an area of your backend you will see that there are tabs, sections, and subsections. These are important because they have specific options. You should also know, that tabs are parents of sections while sections are parents of subsections.

Also Read: Drupal vs Joomla vs WordPress – Which is Best?

Content

Any content item, in Drupal, is called node. In order to create one, you need to go to the Content menu. Here you can see comments, files, and your own content. To create your own content you should press the blue button Add content.  Here you can write the title, tags, images, text and other important options such as menu settings, comment settings, URL path settings, authoring information and promotion options. The last step is to click save and publish button.

Now when you click content you can see the title, content type, author status, update time, and operations.

Structure

At structure, you can see block layout, comment types, contact forms, content types, display modes, menus, taxonomy, and view. Here you can build your website. You can put multiple elements on your website in many places.

With structure, you create sidebars, blocks and other useful and interesting areas for your website.

Appearance

Offers you an overview of templates available for your website. Here you can also see updates or you can edit a theme. You can create a new logo, you can select new colors and so on.

Extend

Extend is the place where you can see an overview of the installed modules. They offer you additional features. In the list of modules, you can see the one that is activated, but you can also activate and install other ones.

Configuration

If you are a super user, you have full access to this area where you can edit multiple settings, like account settings, site information, content authoring, user interface, media, development, regional language, search and metadata and web services.

Users

The people menu helps you to see your staff. Here you have a list, permissions, and roles. Here you can create a user with specific roles which will have specific permissions. Also, you can edit or delete users as you wish.

Reports

To see statistics regarding your Drupal website, you should go at reports where you can see available updates, recent log messages, field lists, status report, top access denied errors, top page not found errors, top searches, and top views.

In the first part, I wrote about basics of Drupal such as features, requirements, installation, content, structure, appearance, extend, configuration, people and reports.

In the second part, I will write about more advanced knowledge regarding Drupal such as content types, creating an article, creating a page, inline editing, using CKEditor, configuring CKEditor, creating a new content type and adding fields to a custom content type.

Content Types

In Drupal, content types are critical. Actually, it is the feature which makes Drupal different from other content management systems such as Joomla or WordPress. Most of them have a title and a body. In Drupal, each item of content is called a node and each and each node belongs to a single content type, which defines various default settings for nodes of that type such as whether the node is published automatically, where it is published and whether comments are permitted.

Every content type has fields with specific information regarding that content type. With content types, you have more control over how content is added to your website and you can even go way beyond the typical “Title and “Body” fields.

Creating an Article

Creating an article is easy in Drupal. You just need to go to content menu, then add content. Usually, you have only one required field for an article: the title. In Drupal, you have multiple options for an article such as summary, body, text formats: basic HTML, restricted HTML and full HTML. If you don’t write a summary, Drupal automatically takes the first paragraph from your body to create a teaser article. Depending on which text format you use you can also use HTML tags such as <p> for paragraphs in restricted HTML, Javascripts in basic HTML or any kind of scripts for full HTML.

Other available options for an article are the tags field and image uploader located below the body.

In the right, there are a lot of options such as visibility and publication settings. From there, you can create new revisions, you can provide a menu link, you can turn comments on or off, you can write a URL alias, you can edit the authoring information writing the date, time and author and the promotion options where you can check if you want the article to be promoted to front page and to be sticky at top of lists. These settings are set up when you create your content type and an editor doesn’t need to change options. You can always override by modifying them.

When you are ready you can press the blue button to save and publish or the arrow next to the button to select save and unpublish. If you click to publish the article will be available on your home page. Here visitors can push the add new comment button to write a comment or the read more button to read more, not only the teaser of the article. Also, he can click on one of the tags to get a list of articles with the specific tag in publication day order.

If you have the proper permissions you can click edit and you can edit the article. After you finished editing, you can press save and keep published or save and unpublish.

Creating a Basic Page

To create a page you just need to press the shortcuts menu and then the basic page. By default, a basic page is represented just by a Title and a body together with the options available for an article excepting the tags field and the image uploader. Basic pages are easy to provide a menu link. You will need to write a menu link title, a description. Additionally, you should choose the parent item and write the weight. Don’t forget to save and publish. You will see the page near your home button on the front page.  You can also delete or edit the page directly from the front end.

Inline Editing

You can inline edit a content type directly from the front page by hovering the mouse cursor over the title and then pressing the pencil icon that appears to the right. Near the pencil will appear the button configure block. Here you can edit the block description, title, shown tabs, visibility.

If you click on the pencil you have three options: quick edit, edit and delete. Quick edit lets you edit your node right on the front end and you only need to hover over the fields and edit the changes as you wish. For an article content type, you cannot edit the image from the quick edit window.

Using CKEditor

The WYSIWYG (What You See Is What You Get) editor for Drupal is CKEditor. It is available when you create or edit a content type, especially and article on the dashboard. If you change to the text format: full HTML, you should have a full version of the CKEditor.

In this version, you can use multiple options such as bold, italic, strike, create a link, add image, quotes, and so on. You can even see an HTML source of the content. Additionally, you can add order lists and unordered lists. You can also enter a table, a horizontal line and you can even show the blocks you created such as H1 block, H2 block, img block, div block, and paragraph block and so on.

You can resize the edit window a little bit, so you can move your images with drag and drop options.

If you want to change the text format, you will get a notification regarding your content. You can lose some parts of it because the new text format doesn’t support some of the features of the full HTML.

Configuring CKEditor

To configure CKEditor, you need to go to the configuration and then at text formats and editors. Here you can see that Basic HTML and Full HTML use CKEditor as a text editor and they both have the Administrator role. The basic HTML can also be used by authenticated user.

If you want to modify these options, you just press just configure and here you can rename the text format, select roles, select text editors and then let the buttons of the editor they can use. You can create button group name, you can drag and drop buttons to the active toolbar. You can also enable images together with the options for images such as sizes, upload buttons and so on. You can even edit the allowed HTML tags for the specific text format.

The active toolbar has two lines so you can add new tools to the second line. Above the active toolbar, there are available a lot of options if you need them.

In the end, you can save configuration and go to an edit area of an article and you can see the new active toolbar.

Creating a New Content Type

Now that we know what content types are, we can create a new content type such as events and user groups. These two content types are connected because groups will sponsor events and events are sponsored by user groups.

To create a new content type, you should go ahead at the structure and then content types. Here you press the blue button named add a content type.

We will call these content type events and write some description. You can also have the submission form settings where you can rewrite title into anything else. Also, you can edit the publishing options, display settings, menu settings.

Now click save and manage fields. You can see the body field of your content type and you can press the edit button to change the label or the body. Now click save settings.

Adding Fields to a Custom Content Type

To add fields to your new custom content type you should click add a new field, select a field type and called it however you want. For an image field type, you can write default options such as an image, alternative text, title or allowed number of images. Click save field settings and now you can set out all the settings such as a help text.

You can also check the required field. You can allow specific file extensions, change the file directory, maximum and minimum image resolution together with the maximum upload size. You can turn on or off the alt field, the title field or the requirement of alt field. Click save settings and now you will see what fields you have available for your custom content type.

For link field, you have only the title and you can allow internal links, external links or both. Additionally, you can allow link text: disabled, optional or required.

For date field, you write the label down and you write the value and the type such as date and type or just date. You can set the default date such as the current date.

When you want to add a field to your custom content type, you can even choose an existing field from the previous ones you already created.

In the second part, I wrote about advanced content knowledge regarding Drupal such as content types, creating an article, creating a page, inline editing, using CKEditor, configuring CKEditor, creating a new content type and adding fields to a custom content type.

In the third part, I will write about more field types that you can add to a custom content type, taxonomy, setting up URL patterns, managing content, revisions, creating content with Devel, displays and views.

Other field Types for Custom Content Type

You can add an email field where you write the label and write the allowed value. Another field type is the list (text) one which lets u enter allowed values lists and you can also change the number value to unlimited. You should take care because, once you enter the allowed values, you cannot change them because they are stored in the database.

To add the field type content, you need to choose it and you need to select what type of item to reference and you also can choose the allowed value. Next, you can choose reference type and you can check the content types referencing to. Also, you can sort the references.

Taxonomy

Taxonomy is nothing more than categories. To set up a taxonomy, you need to go to structure and taxonomy. Here you can add vocabulary. You write down the name and the description. After you saved, you can add terms to your vocabulary. You can add new terms each time after you saved by writing name and description.

Clicking to taxonomy you can see the vocabulary which has the option to list terms. You can move the order of term using drag and drop. Don’t forget to save your changes. You can always sort them alphabetical if you want.

Go back to structure and content types, in order to make Drupal know about our terms. Here you add a new field and select reference taxonomy term. Next, choose the allowed number of values, select the correct reference type and save.

Now Drupal knows about your terms and you can create custom content types using those terms.

Setting up URL patterns

To set up URL patterns you need two modules. You can add and see modules from the extend menu. Those to modules are the Pathauto and Token. You can install them directly copying the download link of the modules and activated them.

The next step is to go to the configuration and at URL aliases you can see aliases for multiple content types. Each node of your Drupal website has a URL like /node/number of a node while for taxonomy terms the URL is like / taxonomy/term/ number of term and for users is /user/number of the user. For example: /node/1, /taxonomy/term/3 and /user/2.

You should press the patterns tab where you can update your patterns for each content type. Click save the configuration and head over to delete aliases and select all aliases and delete aliases now. Now you can bulk generate all your aliases by selecting the types of un-aliased paths for which to generate URL aliases and pressing the update button. Now you can see on your lists that all aliases have been updated.

The great thing is now that you have done this before you have added content, every node that you add from here on out will use the patterns you have established.

Managing content

If you click on content, you will get a list of all available content on your website. It doesn’t matter what type of content they are, you can filter them after published status, you can search for type, language or title. Also, you can reset the filter.

You can choose one or more content at the same time and choose what you want to do with selected content such as delete, sticky, unsticky, promote, publish, save, remove, and unpublish. This is the easiest way to manage content. You can delete a singular note from the operation buttons and also from there you can edit one.

You can also manage comments and files. You can delete comments or unpublish.

If you want to see what the file is you can click on the link to the file. If you want to see where it is used you can click on the used on the link for each file. Additionally, you can see other information regarding files such as MIME-Type, size, status, upload date and changed the date. You can filter files by file name, mime type and status.

Content Revisions

To see revisions, you need to edit a content from your front page adding more content. Next, you can see a new tab on the specific content type where you can see who updated and when updated the new content. You can also see the old versions and you can revert if you want.

Creating content with Devel

To test your content types, you need some fake content which you can easily add and also, you can easily remove it. You can use the Devel module which you can download it from the Drupal website and install it. Once installed you will see under the development block Devel, Devel generate, Devel Kint and Devel node access. You need to activate just Devel and Devel generate.

To generate a lot of content, go to configuration and then at generate content.  Here you can select what content type you want to generate and you can also delete all content. Also, you can select the date, the maximum number of comments per node, maximum number of words in titles and set the language. After you generated the content you should go to content and there is the dummy content. On the front page, you can see your content also.

Displays

By default, Drupal outputs the last ten notes created that are promoted to the homepage. On the bottom, you can see the pagination with 1, 2, 3, next and last buttons. This is not exactly appealing so Drupal allows us to set up what it calls view modes.

Click on structure, content types and you can update the layout for a content type. At the operations, click the manage display. Here you will see there is a default tab and a teaser tab. Click on teaser mode and you can see the fields which are activated. We need to change these in order to have the desired display.

To do this, first, you need to change the layouts. So go to structure and display modes and then view modes. Here you can add a new content view mode or edit and delete the ones you want. You can add new view mode. The existing ones are not available for every content type so go to structure, content types. Here click manage display, scroll down to bottom and click custom display settings and check the nodes you want to have the specific display settings.

Next step is to edit the display you want. You can use drag and drop to order the fields, you can modify label and the format. Once you finished, you can save and see your changes on the front page.

Views

Views, selects, orders and presents your content or any part/ combination of it based on the criteria you define.  To set up your views you need to set the display, format, fields, filter and sort.

A view can be added from structure and views. Here you enter the view name, description, view settings, page settings, block settings and so on. There are already some default views created by Drupal. After you finished, just click save and edit in order to have access to displays. Here you can add new displays, add new fields, new sort criteria, header, footer, no results behavior and so on.

You can also see a preview of the existing content. Click save and you can go to your website where you can see a new button with the custom content type. So you have a landing page for that specific custom content where visitors can see the list of content.

To create a block you just change the block settings when you create a view. Setting up the proper options you can create widgets for your sidebars such as recently created content.

To create a table with fields you create a page and as page display settings you choose a table and create a menu in main navigation with the help of views.

In the third part, I wrote about field types, taxonomy, setting up URL patterns, managing content, revisions, creating content with Devel, displays and views.

In the fourth part, I will write about Book module, Forum module, Telephone module, finding and evaluating modules, layout, users management, reports and help menu and updating Drupal.

Book and Forum modules

Now that we used Devel, Token and Pathauto, we can also use other modules which can enhance our Drupal website even more.

To enable the Book module, go to extend and there you just check it. To enable the Forum module, you make the same thing and in the end, you click install. These two modules are already on Drupal so you just need to activate them.

The Book module and the Forum module are two very different modules, but they both create new content types and extend the Drupal functionality providing new features.

Now go to structure and content types and you can see the book page and the forum topic content type.

The book page content type can be added through the content menu and it can create a book page with covers and blog. The edit area for book page is similar to a basic page, but additionally, it has a new option named book outline where you can create a new book and to set the weight. After you saved it you can preview it on your website. You will notice that there is a printer-friendly version of this page and also an add child page link.  On the Drupal official website at Documentation section, you can see what Book module can create.

Click on add a child page and fill it with dummy content. Now save it and go to your first book page to see the navigation system of the Book module.

There is also available a block with this module. So go to structure and block layout, where you will see the book navigation block where you can place it where you want: header, footer, and so on.

The Forum module creates the forum topic content type available from the content menu. You can create it and even add additional fields. The edit section is similar to the book page, but instead of a book outline, it has the comment settings. To view it on your website, you just need to save and publish. Because it is a forum content type, you can see on the topic forum what you wrote and also you and other people can add comments and topics.

To add a new forum, you need to go at structure and forums where you can add forums and containers. Now when you want to add a new content creating a forum topic you can choose on which forum to appear the topic.

Telephone Module

You can activate telephone module by going at extend and check it. Next press install. Now you can use it to add new fields for your custom content types.

Once you created a new field you need to go to displays and activated. Also, if you use Devel, you need to delete the dummy content and create a new one where telephone field is activated and displayed.

Finding and evaluating modules

You can find and evaluate modules using the official Drupal website at the modules section where you can see the number of modules. Modules only work with the version of Drupal it is intended for. So when you search a module, you need to select your core version.

To evaluate modules you can sort them by popularity or most installed. If you go to a module page, you can see the maintainers, the issues, the documentation, versions. Depending on what information is displayed you need to consider if you can install or no the specific module.

Additionally, you can find modules after maintenance status, development status, module categories, status or keyword.

Layout

Themes give you the general layout look and feel of your website. A theme can be applied your Drupal site without changing the content and it can modify your color scheme and where the blocks are places as well as all of the formatting for your text and images.

Blocks are information that can be displayed on various parts of your website. Block go into block region and block regions are determined by your theme.

Menus give us the navigation for our site and they can be changed by themes.

In the design area, we have blocks, themes and menus. Themes can be installed and set up at any time.

Go to structure and block layout to see the blocks for your current theme. You can configure and place blocks here. You can even remove or order using drag and drop or using the drop-down menu. You can see blocks position by going at demonstrate block region. Now an image with the layout of the theme will appear and you can see all the block region.

If you want to configure a block, you can display title, set the items per block, override title, set the visibility options for content types, pages and roles and set the region.

To manage menu, go to structure and click on menus. Here you can see the default menus. To edit your main navigation menu, click on it and you can edit the title and edit administrative note. Also, you can re-order menus with drag and drop. You can create submenus also by dragging and dropping in the proper position. Also, you need to take care of themes because some of them don’t support sub-menus so they will not appear on the front page.

If you want to add a link to an external website, you should first make a view and then the menu link. For a link to your internal website, just go to add menu link, write menu link title, link, description, check enable, select the parent link, show as expanded if you want and also you can select the weight.

You can get themes for free from Drupal.org because they are contributed themes or you can buy them from ThemeForest or other websites and designers.

To find themes you can use a similar search engine like the module one. You need to select the core compatibility. Also, you can find themes after keywords, maintenance status, development status and status. You can also sort them after popularity or other options.

To install a theme you need to go to a theme’s page and copy the link for tar.gz and go to an appearance at your website and install new theme where you paste the URL at install from a URL. This is the similar process from the module installation. Next, click Install and set as default. Click on settings and you can see the theme’s settings.  When you save it you can go to your website and see your new website layout. By going at structure and block you can see the block region demonstration. You will see that some of the regions aren’t available from the last theme. So you should go to reposition your block regions.

There are also theme frameworks that are harder to install. You need to use a sub-theme first. You install it as the other one, but you don’t activate it just now. Install one of the sub-themes. At the settings for sub-themes, you have a lot of settings such as extensions, responsive menus, fonts, image settings, shortcodes , layouts, color scheme, basic settings and so on.

Users Management

People management is pretty complicated and critical. You can manage people by going at people menu. People, in Drupal, are assigned to roles that have permissions. Permissions can control what people can see and what they can do.

Don’t forget that you are super-user, the number one user. So you have full control and nobody can change your role and permissions.

There are also other roles such as administrators, authenticated users and anonymous users. You can check what each role can do. Also, you can add new roles such as intern, editor, author, and contributor and so on.

When you add a new role you enter the role name and you can move it to your list of roles. The next step is to click on permissions and you can check what permissions you want. Here you will see the permissions for every type of roles. But if you go back to roles and click on the arrow near the edit, you can select edit permissions and you will see only the permissions for the new role.

You can add users from list tab where you can enter its information such as email address, username, password, picture, status active and check the role you want. Click create a new account and now you will have a new user with the new role and with its specific permission.

It is a good idea to check the new account. For this, install the Masquerade module which lets you masquerade as another user to see if you set the permission properly.

Reports and help menu

At the top, you see, next to people menu the reports one. You can click it and then go to available updates to see what reports are available. If it is red you need to make the update, if it is yellow it is not an important update available but you should do it also. At settings, you can check updates periodically and even receive an email when there is an available update. Also, you can see recent log message and filter them after status. You can even clear the recent log messages. Usually, you will get errors regarding themes and modules. You can see field lists, status report and other useful reports.

The help menu offers you help topics for different categories.

Updating Drupal

Updating Drupal is something harder to do than updating another content management system. You need either FTP access of SSH.  To update go to reports at available updates and you can see if there is a recommended version. You can go to update tab and there you can see automatically updates for your modules, however, to update Drupal you need to download the new Drupal and upload it overriding the old Drupal folder.

Don’t forget to make a backup first of all. Next, go to configuration, development and then into maintenance mode and check the putting site into maintenance mode. Remove the core and vendor directories together with all the files in the top-level directory. Upload your new Drupal folder, re-apply any modifications to files and run the update.php file by going into your browser at http://your-website.com/update.php and follow the displayed steps.

Next check if everything is ok by going at reports and at the status report.

To backup and migrate or just backup, it is a good idea to install Backup and Migrate module.

The end

In the end of this extensive guide about Drupal, you have learned basics and advanced knowledge about history, features, requirements, installation, content, structure, appearance, extend, configuration, people, and reports and help section.

Now you can use Drupal for exactly what you want.

Resources: Acquia, Drupal.

Leave a Comment

Your email address will not be published. Required fields are marked *