This forum is for assistance with theme development.

Anyone Try D10's StarterKit?

I'm testing Drupal 10's StarterKit Theme script. I issue the script command, giving a theme name, but the theme is never created? What gives? Should I stick with the traditional subtheme practice?

How to merge a second level array into primary array in TWIG

Is it possible to merge a secondary level array into a primary array without creating new primary arrays.  For example I have a set of “tiles” that need to have an array of “list” that I’m merging like so.

{% set tiles = [] %} {% set list = [] %}

{% for item in content.field_tiles %}

{% if item['#paragraph'].field_image.value %}

{% set tiles = tiles | merge([{

Sub Theme

How can I get the media file description field in page.html.twig?

I have a media type "mt_packages" registering a PDF and enabled the description field.
Added field "field_packages" with unrestricted media reference to content type "ct_packages" to reference "mt_packages".

How can I get the media file description field in page.html.twig?
I got the URL, but not the description.

Below is the code that got the URL. What should I add to this?
{% for file in node.field_packages %}
  <li>
    {{ file|file_url }}
  </li>
{% end for %}

Polls module - problem with mobile

Does anybody know why modules Polls do not work on mobile devices? Everything is okay either on the desktop or laptop. Mypoll.uk - there is a link to the polls (left sidebar) and if you click on it there everything looks okay but not when you use any mobile. It works only on the desktop. The Drupal version is 9.4.8. Any idea what is going on? 

Yours Faithfully 

Drupal User :) 

Twig in site folder not overriding core files

I am trying to format my login page.  Using the twig debugging, I see that the suggested twig file is page--user--login.html.twig.

It's a multi-site Drupal folder.  So I've created that file and put it in app/web/sites/mysite/themes/uikit/templates/layout/page--user--login.html.twig

But almost nothing I modify in that file, or in the entire layout folder shows on the site.

The twig debugger shows that the site is reading template files from outside of the sites folder.  For example:

Pages

Subscribe with RSS Subscribe to RSS - Theme development