Skip to content

Instantly share code, notes, and snippets.

@abutler3
Last active April 6, 2018 20:04
Show Gist options
  • Save abutler3/b104e45c1b6cb2f6589ae41ea85f96ab to your computer and use it in GitHub Desktop.
Save abutler3/b104e45c1b6cb2f6589ae41ea85f96ab to your computer and use it in GitHub Desktop.
https://acquia-academy.gitbooks.io/study-guide-drupal-8-site-builder-exam/content/study-guide.html
http://www.tanay.co.in/blog/cracking-acquia-certified-drupal-site-builder-certification.html
https://www.4sitestudios.com/blog/when-to-use-content-types-taxonomies-and-custom-entities-in-drupal
What are blocks?
- https://www.drupal.org/docs/8/core/modules/block/overview
- https://www.drupal.org/docs/user_guide/en/block-concept.html
- Blocks are individual pieces of your site’s web page layout.
They are placed inside the regions (see Section 2.1, “Concept: Regions in a Theme”) of your theme, and can be created,
removed, and rearranged in the Block layout (admin/structure/block) administration page. Examples of blocks include the
Who’s online listing, the main navigation menu, and the breadcrumb trail. The main page content is also a block.
- Some modules make new blocks available for placement on your site. For example, when the core Search module is installed
and configured, it provides a block that contains a search form. You may also create and place your own custom blocks.
- Each block has its own configuration settings, which allow you to select which pages of your site will display the block.
It is even possible to place multiple copies of a block, each with its own separate configuration and visibility rules.
Why would you use them?
Blocks are used to place content in a region on a page
Where would you place them?
Blocks are placed in regions via the Block Admin page Administer > Structure > Block Layout.
How are they created?
In the Manage administrative menu, navigate to Structure > Block layout > Custom block library
(admin/structure/block/block-content).
Click Add custom block. The Add custom block page appears
enable, place, and configure blocks at Administer >> Structure >> Block layout.
add a block at Administer >> Structure >> Block layout >> Place block.
add a custom block at Administer >> Structure >> Block layout >> Add custom block.
What are the various blocks provided by various modules available in core?
Page title
Primary admin actions
Tabs
Search form
User login
Place block
Help
Recent comments
Recent content
Who's online
Administration
Footer
Main navigation
Tools
Shortcuts
User account menu
Breadcrumbs
Main page content
Messages
Powered by Drupal
Site branding
Syndicate
Who's new
What are content types and nodes?
Content types defines various default settings for elements of that type
Content Type consists of the following primary elements: Content type base configuration and Content type fields
When would you create a new content type?
First, content types lets you organize your site more efficiently.
For instance, you might have "Info" and "News flash" as two simple content types on your site, rather than
just using "Article" for both. Additionally, creating your own content type means that you can create
custom fields. These fields can appear as text boxes, select lists, check boxes, etc.,
providing extensive functionality to content on your site.
Check the various configuration options available under each content type.
Navigate to the Content types page (Administer > Structure > Content types).
What are menus?
Menus are a collection of links (menu items) used to navigate a website.
The Menu module provides an interface to control and customize the powerful
menu system that comes with Drupal. Menus are primarily displayed as
a hierarchical list of links
How do you create them?
Navigate to the Menus page (Structure > Menus or http://example.com/admin/structure/menu).
Click Add menu.
In the Title field, enter a title.
In the Description field, enter an optional description.
Click Save.
How do you place them on the site?
Assuming you plan to add nodes to your menu and not just external links, you must enable it in the content type for the node(s) that will be the target of the menu's links. It is possible to add menu links that are not enabled this way through the Menus page. If you do, you will find that certain changes cause your link to disappear from the assigned menu. Menus can be enabled on multiple content types.
Navigate to the content type for the node(s) (Structure > Content type or http://example.com/admin/structure/types).
Locate the content type and click edit.
Choose Menu settings.
Click the checkbox of the menu(s) you want to enable.
(Optional) Set the Default parent item to choose a default menu for the content type.
What are Vocabularies?
Taxonomy, a powerful core module, gives your sites use of the organizational keywords known in
other systems as categories, tags, or metadata. It allows you to connect, relate and classify
your website’s content. In Drupal, these terms are gathered within "vocabularies". The Taxonomy
module allows you to create, manage and apply those vocabularies.
Each vocabulary consists of a set of terms.
What are terms?
When would you create a new vocabulary vs When would you create a new content type?
If you're working in Drupal 7, you can expand both taxonomy and content types with fields,
so it's a little more tricky to decide which to use.
Generally, if I end up using the word 'category' in describing a piece of content, I will try to
go with taxonomy, mostly because the kinds of modules that are built to cater to and extend taxonomy
functionality. If I'm going to build a contributed module that helps do something neat with categories,
I'm going to built it for taxonomy rather than content types.
The exception to this would be if my categories are going to be acting a lot more like content
then categories. Then I might want to go with a content type to leverage contributed modules build
specifically for extending nodes specifically, and not entities in general.
What are roles?
Drupal's access control system is based around 3 core concepts and that is the user, a role, and permissions.
What are permissions?
How are users, permissions and roles related? How would you add a user to a role?
Users are visitors to the website. It can be someone who's just browsing and looking at your site.
it can be somebody who's logging in and actually creating content. it can be the system administrator—anybody
who's interacting with the site. in some way is a user
Roles are basically groups of users. So you create a role or a group, and then users can be assigned to that role.
That would be something like maybe editor or maybe administrators—that kind of a thing.
Different kinds of roles—groups of people who need to be able to do things on the site. Then permissions are
assigned to a role or a group and determine what that group is allowed to do or not do—it's lot more granular.
So a permission would be something like administer modules or create articles—those kinds of things.
It's really important to sit down and think about these 3 pieces.
Given a scenario, demonstrate ability to configure user accounts.
People (list of users) > Edit > Roles section lists the roles available on a site. Default is authenticated user and admin
Assign a role here
Role - A name for a group of users. Create Role here
Permission - What users are and are not allowed to do on the site. Assign permission to roles here
2. Working with a Drupal Site
2.1. Given a scenario, determine how administration tools are used for site management.
2.2. Given a scenario, demonstrate ability to configure user accounts.
A user is anyone who visits your website, including you, whether or not they have an account on the site. Drupal manages what different users can view and do on your site through an access control system that uses roles and permissions. Permissions are very granular and determine specific access, like "administer users", while roles bundle sets of permissions together to make them easier to assign to different users. Drupal core comes with 3 default roles: anonymous, authenticated, and administrator. You can add to this list and customize the permissions for all of them.
As a module developer, you can programmatically get information about users. You can also add your own custom permissions to the site to allow or restrict access to features or tasks.
2.3. Given a scenario of a completed content item, identify which elements are taxonomy terms, image fields or text fields.
Taxonomy provide a way to classify your site's content. Taxonomy vocabularies are created with terms within those vocabularies. Then reference fields can be added to content types or other entity bundles so that content can be individually categorized.
For example, on the Drupalize.Me website, we have a vocabulary called Categories with terms for each category of content we have, i.e., Site Building, Theming, Module Development, Site Administration, and Backend and Infrastructure. We then add a reference field on each content type, like blog and tutorials. This enables us to "tag" each blog post or tutorial with the appropriate category.
Example tasks
Set up a taxonomy to categorize your site's content
Access taxonomy entity data in a module
Confidence
The process of using Drupal's administrative UI to create vocabularies, terms, adding taxonomy fields, and tagging content with taxonomy terms is essentially the same process in Drupal 7 as in Drupal 8. However, the developer experience of accessing taxonomy-related data in a module has changed due to Drupal 8's object-oriented architecture and also its emphasis on practically everything being an "entity." Thus, instead of taxonomy-specific functions, taxonomy data is accessed programmatically via the Entity API. See the Entity topic for more information.
The ability to upload, manage, and display various assets like files, images, videos, and audio, is important to many websites. In addition to simple file display and download, there are also options to embed different kinds of external media within content for viewing and playing. If a site has a lot of assets, there are also tools to help manage and quickly find, edit, and reuse existing assets when needed.
Example tasks
Add a field that allows for file upload and download
Embed images and video in content
Manage preset image styles
Browse and locate a file from a media library
Confidence
Media management has been in rapid development throughout Drupal 7's life cycle and into Drupal 8, so documentation may not always match the latest version of the modules. As of Drupal 8.4, media features are being added to core with a new Media entity type. This is the first step in completing the "Essentials" phase of adding media to core. You can read more about the full plan in the Media in Drupal 8 Initiative issue. The plan for the Essentials phase in 8.4 and 8.5 can be found in the Media initiative: Essentials - first round of improvements in core issue. This means media in Drupal 8 is very much in flux and documentation will change regularly.
2.4. Given an example of a page layout, determine what is content versus a block.
A block is a reusable widget that is placed inside regions (layout containers) of your theme. Blocks can be created, removed, rearranged, and configured in the Block layout administration page. Examples of blocks include the "Who's online" listing, the main navigation menu, and the breadcrumb trail. The main page content is also a block. Each block has its own configuration settings, which allow you to select which pages of your site will display the block.
A module can provide a block using the Plugin API. When a module provides a block, it is listed on the Block layout administrative page and can be placed in a region by a site administrator. Many tools, like Views or menus, have the ability to generate new blocks based on configuration, which can then be placed into regions.
Example tasks
Rearrange blocks in a theme by placing them in specific regions
Customize the visibility of a block for certain pages or types of pages
Provide a block in a module using the Plugin API
Confidence
The Block layout system underwent many changes and transformations during Drupal 8's development cycle. Be sure to scrutinize or avoid resources that were published before Drupal 8's official release (November 2015), as they can confusingly refer to configuration screens that have since been redesigned.
2.5. Demonstrate an ability to troubleshoot problems related to content, configuration and maintenance
3. Content Modeling
Content modeling consists of identifying and constructing the different building blocks of data that compose the information on your site; what kinds of content you need, the structure of that content, and how they relate to each other. Drupal is an incredibly flexible tool for building rich content models. Thanks in large part to things like the entity system and the wide variety of field types available, Drupal can support a wide range of content models, from simple to complex. Before you start site building it's important to consider your content as a whole and work out a model that will guide you through the content building process.
Example tasks
Understand why developing a content model is important
Learn about Drupal tools that support the implementation of a content model
Create a content model plan for a Drupal site
Confidence
Content modeling itself isn't a Drupal-specific practice. Thankfully the Entity and Field subsystems allow for quite complicated modeling and are stable at this point in the Drupal development cycle. Keep an eye out for contributed modules that support more advanced types of data.
3.1 Demonstrate ability to model content using Content Types and Vocabularies
A content type is a subtype of the content entity. When a content creator goes to add new content to the site, they are presented with a list of content types to choose from to get the appropriate form to fill out. Each content type defines the fields it contains, along with default content settings like submission form and publishing options. They each serve a particular content purpose on the site. For example, a site might have a different content type for blog posts, podcasts, and recipes, each with their own set of fields that pertain to that kind of content.
Example tasks
Create a new content type
Modify an existing content type, e.g., change the name of the Article content type to Blog post
Create a new piece of content, like a blog post
Confidence
Content types are a very stable feature of Drupal core and do not change much, even between major Drupal versions.
Taxonomy provide a way to classify your site's content. Taxonomy vocabularies are created with terms within those vocabularies. Then reference fields can be added to content types or other entity bundles so that content can be individually categorized.
For example, on the Drupalize.Me website, we have a vocabulary called Categories with terms for each category of content we have, i.e., Site Building, Theming, Module Development, Site Administration, and Backend and Infrastructure. We then add a reference field on each content type, like blog and tutorials. This enables us to "tag" each blog post or tutorial with the appropriate category.
Example tasks
Set up a taxonomy to categorize your site's content
Access taxonomy entity data in a module
Confidence
The process of using Drupal's administrative UI to create vocabularies, terms, adding taxonomy fields, and tagging content with taxonomy terms is essentially the same process in Drupal 7 as in Drupal 8. However, the developer experience of accessing taxonomy-related data in a module has changed due to Drupal 8's object-oriented architecture and also its emphasis on practically everything being an "entity." Thus, instead of taxonomy-specific functions, taxonomy data is accessed programmatically via the Entity API. See the Entity topic for more information.
3.2 Demonstrate ability to configure and manage comment types and comments
Comments are a content entity type that allows users to leave commentary associated with a specific piece of content. You can configure which kinds of content do, or do not, have comments enabled, and who has permission to write and read comments. You can configure multiple comment types (entity bundles), and add custom fields to each comment type.
Drupal has a built in back end listing where you can manage comments left on the site, which includes basic review and moderation tools. A wide variety of contributed modules extend Drupal's core comment moderation tools.
Example tasks
Configure whether comments display or not on a content type
Control who has access to leave comments
Manage and moderate incoming comments
Configure other content entities to allow commenting
Confidence
From an end user perspective, comments have remained the same over the last several versions of Drupal, so even older documentation is often accurate. As of Drupal 8 comments can be configured to work with any content entity (not just nodes) and the relevant settings are controlled via a field attached to the entity type where you want comments enabled.
3.4 Demonstrate ability to configure and manage Contact forms
https://www.drupal.org/docs/8/core/modules/contact/overview
https://drupalize.me/videos/hands-drupal-contact-form?p=1252
The Contact module allows site visitors to send emails to other authenticated users and to the site administrator.
Uses
Through personal contact forms, users can send one another an e-mail. And through site-wide contact forms, users can send e-mail to arbitrary email addresses, such as the site maintainers.
With either form, users can specify a subject, write their message, and also have a copy of their e-mail sent to their own address. Through contact forms, users allow themselves to be contacted yet keep their own e-mail addresses private until the message is replied to. As an administrator, you can enable or disable the contact module altogether.
As a user, you can also enable or disable your personal contact form if that option has been provided. When the form is enabled, a contact tab is displayed in your user profile, for everyone to see. (Privileged users such as site administrators can contact users who have turned their forms off, as they can access their user account email addresses.) When you visit your own profile, the contact tab is not displayed. However, it is displayed to other users (if it has been enabled).
You can set up "categories" for the site-wide contact form, to allow for multiple recipient options. For example, one category might be "website feedback," and another might be "product information." For each category, you can specify one or more email addresses to which the form will be sent. You can also specify whether or not the user will receive an automatic reply.
You can specify the text to display on your site-wide contact page and you can optionally limit how many times a user can submit a contact form in an hour.
Configuration
Enabling Contact module
To enable the Contact module:
Navigate to the Modules administration page Menu > Extend or http://example.com/admin/modules
In the Core module section, enable the Contact module.
Click Save configuration.
Configuring the site-wide Contact form
Navigate to the Contact Form administration page (Menu > Structure > Contact forms or http://example.com/admin/structure/contact)
Click "Add contact form" and enter the following information:
Label: Enter a title.
Recipients: Enter one or more email addresses. Separate each address with a comma.
Auto-Reply: Enter an optional response such as an acknowledgement of receipt. Leave this field empty if you do not want to send an automated response.
Weights: Set the order in which the contact forms will be displayed.
Selected: Specify whether you want this contact form selected by default.
Click "Save".
Configure the user Contact form
Navigate to the Account Settings page (Administration > Configuration > People > Accounts or http://example.com/admin/config/people/accounts)
In the Contact settings section specify whether the contact form is enabled for users by default.
Click "Save configuration."
Controlling repeat submission blocking (flood control)
There are hard-coded limits to how frequently contact forms can be submitted. In Drupal 8, a special drush command provides a way to configure flood control behavior:
drush cedit contact.settings
This lets you change the limit and time limit after which the flood restriction resets.
Menu link
If you want your contact form to appear in a menu, go to Structure → Menus → Footer. Click on the "Enabled" checkbox at the right of the Contact item, click on "Save" at the bottom. For other edit options click on "edit" at the right of the Contact item, and in "Parent link" you can choose a different menu if you prefer. Thanks to the "weight" you can choose where the item will appear in the menu. The heavier the item the lower it will appear (for a vertical menu) or more to the right for a horizontal menu. Don't forget to click on "Save". No matter which menu you choose, you can move the Contact item to the location you want by dragging and dropping its handle in the form of arrowed cross, on the left. This will change the item weight. Don't forget to click on "Save". If you want to translate the menu item for your contact form, do it with the interface translation feature of the contributed module "internationalization": see HowTo: Basic Internationalization setup.
Adding content to the form
If you want to add text (for instance your phone number) or photos etc. to your form page, you can do that by adding a block (or several blocks) which will appear only on the contact form.
3.5 Demonstrate ability to configure and use multilingual content and interface
A multilingual site has more than 1 language that users interact with. Two common terms you will hear used with multilingual sites are internationalization, abbreviated as i18n, and localization, abbreviated as l10n. Internationalization is the underlying structure that allows software to be adapted to different languages, and localization is the process of actually translating the software for use by a specific locale.
In Drupal there are 4 main ways of working with language on your site. You can choose how much or how little of each you wish to use on your site.
Language: adding and choosing the languages
Interface Translation: text that is hard-coded into the website, like administrative interfaces from core and contributed modules. There is a large selection of community-contributed interface translations for core and contributed projects.
Content Translation: text that is created as an entity, like content types or users
Configuration Translation: text that is created by configuration settings, like the site name
Example tasks
Assign a language to a piece of content
Allow a user to change the site language
Translate content
Translate the website interface
3.6 Demonstrate ability to configure and manage menus, menu items and menu blocks
https://drupalize.me/tutorial/user-guide/menu-concept?p=3070
----------------
http://www.tanay.co.in/blog/cracking-acquia-certified-drupal-site-builder-certification.html
Ensure you understand thoroughly:
Content
Managing content. Publishing, Unpublishing.
Commenting system
Structure:
What are blocks? Why would you use them? Where would you place them? How are they created? What are the various blocks provided by various modules available in core?
What are content types and nodes? When would you create a new content type? Check the various configuration options available under each content type.
What are menus? How do you create them? How do you place them on the site?
What are Vocabularies? What are terms? When would you create a new vocabulary vs When would you create a new content type?
Themes:
Enabling and Disabling themes. Theme configuration.
People:
What are roles? What are permissions? How are users, permissions and roles related? How would you add a user to a role?
Modules:
What are contrib modules? How would you find the right one you need? How do you select from the various options available? How would you download a contrib module? How to install one? How to keep the module updated? How to remove the module? Disabling a module. Uninstalling a module.
Configuration:
What are text formats? What are filters? How are they related? Why would you need them? How do they help you in securing the site?
File System. Public and Private. What happens to the uploaded files? How to upload/attach files to content? What are image styles? Why would you need them? How do they help? How do create new image styles?
Under account settings, check out the various options related to user accounts. Adding fields to user profile. Configuring who can register on the site. Configuring the various emails sent out to the users at various stages of the registration process.
Under ‘Regional and Language’, check out how to configure the locale and timezone settings, the various date formats available and how to add new ones.
Configuring the core search, Indexing and Content Ranking Settings.
Managing aliases (without Pathauto) as well as basic automation of aliases using Pathauto
Configuring Site Information like Site Name, Slogan etc. Configuring Cron.
Take a look at the Aggregator module that comes with core. Make sure you are familiar with what the module is for and how to configure it to pull some feeds into your site.
Check out the development options available like Various caching options and how they affect the display of the site. What are the various logs accessible from within the Drupal site. The status report page. What is maintenance mode? Controlling display of various type of errors and notices displayed on the site.
Views:
Apart from being able to build fairly complex views, ensure you understand the following thoroughly:
Views Relationships
Contextual Filters
Views Attachments
Rewriting Field output
Configuring the format of display of fields
Views Cache Configuration
Adding Headers and Footers to Views
In short, ensure you thoroughly understand each of the options available on the views configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment