For assistance with theme development.

STICKY: Theme development forum guidelines

The theme development forum was created to aid those who are developing themes for Drupal. This forum is not for issues you may be having with contrib themes. Issues with contrib themes should be placed in the issue queue of the theme in question. Please respect this.

If you you have drupal installed already and are seeking a theme, have a question about a specific theme and what it does or if it will fit your use case, please place your questions in the Post installation forum.

Drupal 8 - Install theme programatically

Hello guys,

In Drupal 8 I am trying to install a theme programmatically.

I try to do this via a custom module and my ***.info.yml file looks like:

name: Setup site
type: module
core: 8.x
  - ctools
  - adminimal_theme

But when I install this module, my theme doesn't get installed.

What am I missing here ?
It works perfectly for modules (ctools in this example.)

Kind regards

menu & showing a div

I've got a page template that has four divs that contain this node's content - with a small menu in the template that uses jquery to hide/show the relevant divs.

shift logo to the right of an object in zen sub-theme

Hi, back to webdesign after a few years and dealing with D7 and Zen for the first time, please be patient ;)

I am working on a website on D7.41 with a zen sub-theme.

I'd like to put a slideshow created through DDBlock in the header, shifting the logo to the right. The slideshow works fine and is perfectly placed in the header block when the logo is disabled, but by enabling the logo again it goes below the area.

Get actual language in preprocess and twig

in a multilingual site (de:default and fr, it) i want to get the language selected by the user (language switcher or language part in url)
Variable for Twig, f.i. to use different includes in page.htm.twig according to language (cannot use blocks, since we use fontwawsom and ckedit is a pita with that). And want to be able to do that anyway.

Also get this info in a preprocess hook. And if available Drupal variables in Twig does not provide that, create that, so that in Twig available (s. my other question). And also of course to create theme - suggestions.

Cannot add variable from preprocess to twig template

Im trying:
function qsysdesktop_preprocess_page(&$variables) {
$variables['inpreprocesspage'] = 'In preprocesspage set by code';

in qsysdesktop.theme.
In page.html.twig I am doing:

Set by me:{{inpreprocesspage}}

Does not write output in page (cache cleared and so on, debug on.

How can I accomplish this ?
Thanks for help and info


Subscribe with RSS Subscribe to RSS - Theme development