Better Practice, Dec. 2018

(singke) #1
10 \ December 2018 \ http://www.phparch.com

FEATURE

The Flexibility of Drupal 8


Michael Miles


This article demonstrates six different methods of changing content and functionality in
Drupal. Each method requires a different skill set and level of expertise, from non-technical
inexperienced users to advanced Drupal developers. For each method, we describe the
components, skills, knowledge, and limitations involved. The goal is to highlight Drupal’s
flexibility as a Content Management framework.

Drupal 8 supports teams of all skills
and composition and is a PHP-based
framework and content management
system. Drupal provides options that
allow anyone to make the content or
functionality changes needed. We’ll
describe Six different methods of
changing content in a menu to demon-
strate this flexibility. A menu is a
content managed collection of links
on a site. Each link, referred to as a
menu item, has a URL and label value.
Each method explanation includes the
components, skills, knowledge, and
limitations involved.
An “out of the box” Drupal website
has been set up to showcase the flexi-
bility of Drupal 8. The website uses the
latest version of Drupal, 8.6.2 and has
the Umami profile installed. Umami is a
demo profile shipped with Drupal 8, as
shown in Figure 1. It creates an example
food magazine website. The menu to
change is the Main Navigation, shown
in Figure 1, is above the page content
on the right. View this issue^1 for more
information about Umami.
1 issue: https://phpa.me/drupal-

Drupal Admin
Drupal provides an administrative
GUI interface. This interface gives
a non-technical user the ability to
manage content, users, and function-
ality. It is the lowest barrier to entry
for users to complete needed changes
because it requires no technical abilities.
The only requirement is the knowledge
of how to navigate the Drupal admin.
The Drupal admin method does,
however, come with the most limita-
tions. Administrative users can only
make changes to which the interface
provides access. Configuration options
are limited by what Drupal core,
modules, and themes make available.

Changing a Menu Item Using
the Drupal Admin
A user needs to be logged in with an
account having administrative permis-
sions to change a menu item using the
Drupal admin. The specific permis-
sions are:


  • Administer menus and menu items

    • Use the administration pages and
      help

    • Use the administration toolbar (not
      required, but helpful)
      Out of the box, the Drupal “adminis-
      trator” role has these permissions.
      The administrative toolbar is used to
      navigate to the Menus admin page by
      clicking on Manage and then Structure.
      From the list of administrative sections
      on this page, select the Menus section.
      As seen in Figure 2, the Menus page lists
      all menus in the Drupal instance. The
      Edit menu operation link for the menu
      Main navigation is then selected.
      The Edit menu screen shows a hier-
      archical view of all the menu items.
      Clicking on the Edit operation link
      next to the item label presents the Edit
      menu link form. As seen in Figure 3,
      this form provides the ability to change
      many aspects of the menu item such
      as the title, destination link and parent
      link.
      In the Menu link title field the value
      for the “About” link is changed to “Who
      We Are”. The Save button is then clicked




Figure 1 Figure 2
Free download pdf