Filters - Modifying Variables In Twig Templates

Filters in Twig can be used to modify variables. Filters are separated from the variable by a pipe symbol (|) and may have optional arguments in parentheses. Multiple filters can be chained. The output of one filter is applied to the next.

Example: {{ ponies|safe_join(", ")|lower}}

The list of filters that can be used in Twig templates for Drupal consists of all the filters in the Twig engine as well as some Drupal specific filters.

List of Twig filters.

Facilitator instructions

Facilitators are experienced mentors and contributors who lead core mentoring sessions. They coordinate mentors and connect them with participants. Facilitators have access to create new tasks, manage user accounts, and so on.

Mentor instructions

Mentors are contributors who can occasionally commit a 1- or 2-hour block of time during core mentoring to assist participants. Some mentors participate in core mentoring regularly; others are experienced contributors who are willing to be "backup" when a mentoring session is particularly busy or one of the regular mentors is not available.

Donations using Drupal Commerce

This tutorial allows one or more donations to be made on your site. It can also be used for other types of payments where the payer specifies the amount, for example a simple invoice payment where the user enters the invoice number and amount.

1. Install the necessary modules.

  • Download Commerce and install the whole profusion.
  • Download and install Customizable Products
  • Download and install Rules.

2. Add the donation product line item type

Process plugin: concat

The concat plugin is used to concatenate strings in the source. An example use case would be when the source data contains an array of strings that should be imploded into a single value for Drupal 8.

For example:

process:
  new_text_field:
    plugin: concat
    source:
      - foo
      - bar

Will become:

foobar

You can also specify a delimiter. For example:

Theming a view

These pages will explain how to theme Views 3.

Pages

Subscribe with RSS Subscribe to RSS - Needs copy/style review