5: Other basic Drupal core settings
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
This chapter collects some miscellaneous administrative settings a Drupal developer should know.
The initial version of this section of the Community Documentation came from the book Drupal 7: The Essentials, courtesy of NodeOne and Johan Falk.
Administration aids
There are a number of shortcuts and nifty tools enabled in a standard Drupal installation, all with the purpose of making site administration easier. They are summarized below.
- The black toolbar at the top on Drupal pages is provided by the Toolbar module. It contains links to the top-level items in the menu management.
- The administrative overlay, the frame that appears when clicking on administration links, is provided by the Overlay module. One of its points is to make it easier to find the page you were on when starting your administration.
- The Contextual links module adds a number of links in drop-down menus at various elements on your Drupal site. The menu is accessed by clicking on the gear icon that appears when hovering over elements that have contextual links – such as blocks.
- The Dashboard module makes it easier to build a collection of blocks on one single administration page (found under the dashboard link in the toolbar).
- The gray list just below the black toolbar is provided by the Shortcut module, which also provides links (marked with plus signs) to add default shortcuts. The latter are used to add links to the former, which is a handy way to always have your most-visited administration pages one click away. It is possible to create different sets of shortcuts. From the toolbar, select Configuration, Shortcuts. Users with relevant permissions may select which shortcut sets to use on a separate tab on their user pages. Note that while shortcuts remind us of menus, they are technically separated.
TIP: The modules Administration menu and Admin are popular complements to Drupal's built-in tools for administrators. They both provide alternative, and in some aspects more user-friendly, administration menus.
Text formats
In Drupal, all text that may contain markup is handled by one of the website's text formats. These are rules determining how the text should be processed before being displayed. The text formats have three main purposes:
- Security: The text formats make sure that any malicious code or script, entered by malicious users, doesn't have malicious effects on the site or its visitors.
- Sanitation: The inputted text is processed to make sure that any markup is clean and follows common standards. This is one of the reasons for Drupal being naturally search-engine friendly (as well as friendly towards screen readers).
- Comfort: Text formats may also be used to convert certain expressions to HTML. In Drupal core, this is used to automatically create things like line breaks and links from URLs, but it could also be used for allowing the same type of markup as is used on Wikipedia, for example.
Each text format consists of one or more filters. The formats and most filters can be managed using the toolbar Configuration, Text formats.
TIP: Even if Drupal processes all formatted text, the original text is never changed, which is an important rule for how to treat user input. Since the original potentially malicious input is stored in the database, it is important to keep in mind that user-provided text should always be sanitized.
Other settings
This last section of the Drupal core basics chapter contains some loosely related items you may find useful.
- The page you use as your site's home page can be set from the toolbar Configuration, Site information. The default setting is "node," which provides a list of teasers of nodes marked with promote to front page.
- Drupal depends on a number of scheduled activities being carried out on a regular basis – for example, allowing indexing of new content for searches. If your server has native cron functions, you can turn off Drupal's backup functionality for scheduled activities at the toolbar Configuration, Cron. On the same page, you can also trigger cron activities manually - for example, to make new content immediately searchable.
- If things start behaving weirdly while you're building your Drupal site, it is wise to empty Drupal's cache. This processed data is temporarily stored to speed up the website. If this doesn't help, check the error logs for interesting messages. You can clear the cache using the toolbar Configuration, Performance. The most interesting log messages are available at Reports, Recent log messages.
- When performing system updates on your site, you should put it in maintenance mode to make sure that site visitors aren't accessing the database while it is being updated. This setting is on the toolbar at Configuration, Maintenance mode.
Try your skills
The tasks described below continue the suite in the previous chapter.
Modifying text formats
Hi, it’s Intern.
In some of the longer pieces of text on the site, I have included subheaders using <h2>, <h3> and <h4> HTML tags. So far, I have been using the full HTML text format to make these tags appear, but this doesn't seem right. Could you make it so that the filtered HTML text format accepts these subheadings? Thanks in advance.
//Intern
Videos by "Wunderkraut Sweden":
Exercise: https://vimeo.com/33529398
Solution: https://vimeo.com/33529547
A bonus task
It’s Boss.
Today I typed example.com/aboutus in the URL bar to view our About Us page, and I got an ugly, boring page not found message. I immediately called our web consultants and asked if you can change the message. They said that you can, technically, but that they haven't trained you on how to do it. They asked if they should update the administration manual or schedule a training session, but I figured it was probably cheaper to let you figure it out yourself. Ask Intern if you like – she actually seems quite capable when it comes to the web.
So – could you provide me with a new message for page not found pages? I have faith in you. Thanks.
//Boss
Hint: "Site information"
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion