FortyTwo

Building a theme with FortyTwo

The FortyTwo theme is designed to be extended by a sub-theme. You shouldn't modify the any of the CSS or PHP files in the fortytwo/ folder; instead create a sub-theme which is located out side of the root fortytwo/ folder.

We tried to make the base theme as clean and simple as possible. It has some styling for basic input fields and buttons.

Including Part Template

Many themers prefer to keep header / footer codes in a separate file and call the file in page.html.twig

Let's say you have created following file in your theme folder for header.
/THEME_NAME/includes/header.html.twig

And now you want to include this file in page.html.twig

Use below code to include this file.

{% include directory ~ '/includes/header.html.twig' %}

Classy themes css selectors

Document all css class selectors that are in the classy theme Drupal8 RC 2

format:

.foo { }
.foo-bar { }

filename.html.twig / filename.css

Twig - Available CSS selectors in the Classy theme:

LAYOUT

Body

Theming in Paragraphs for Drupal 7

Theming

The default paragraphs template is in paragraphs-item.tpl.php.
It uses theme suggestions for other templates, the following suggestions are available:

  1. paragraphs__[view_mode] (e.g. paragraphs--default.tpl.php)
  2. paragraphs__[type] (e.g. paragraphs--image.tpl.php)
  3. paragraphs__[type]__[view_mode] (e.g. paragraphs--image--default.tpl.php)

Using attributes in templates

Documentation of the Attribute object that appears in many html.twig templates.

Pages

Subscribe with RSS Subscribe to RSS - theming