This forum is for assistance with theme development.

[Solved] Junior Drupal Dev attempting to overide a form - textfields to select

Hi guys,

I'm just looking for guidance on how to make some changes to a form..

A client wants a form with select options only.

The fields that are generated from taxonomies give you the option for a drop down, So I'm good here.
However, a few of the form fields by default are text fields.
I've looked into a module solution but better exposed filters don't have a dropdown option for input fields.

What I have done so far?

HTML Head-Tag manipulation in custom Drupal maintenance page

Dear all,

Is it possible to adapt HTML tags (here: HTML HEAD tags) in a custom maintenance page put in the following directory?

<drupal-dir>/web/themes/custom/<customTemplateTheme>/templates/maintenance-page.html.twig

How to theme a View wrapping it with a class?

Drupal core ships with a View named "Frontpage" that renders the front page. I set it up to post three nodes on the front page.

I want to wrap it is a flex-class like this:

<div class="d-md-flex justify-content-between">
  <div>First node</div>
  <div>Second node</div>
  <div>Third node</div>
</div>

Unfortunately the using "CSS class" under "Advanced" doesn't work, because Views wraps another class between the class added by me and he actual nodes.

Any ideas?

Display author picture on product page

Hi all,

I would like to display the product author's avatar on product page. That is, the user who created the product on marketplace.

I can get username, user ID 
{{ product.uid }} , {{ product_entity.getOwnerId }}

How to get user's picture?

Drupal 10.01, Commerce 2.

Suggestions for breaking node into multiple pages

I find that there seems to be no way to break a long node into multple pages.

There used to be some pagination modules earlier, but Paging and Smart Paging modules never got beyond D7.

I wonder what others are doing to break up pages.

Tbe Book module may be fine when there are chapters, sections, etc.

Incrementing in Twig template

Hi there,

my website menu has multiple levels. On the mobile version, I am working with Accordion elements to expand/collapse them. I want to realize my menu without JS and with CSS only. Therefore, I use checkboxes to trigger the accordion elements to expand/collapse.

For the mobile menu, I created a custom twig template. I added the complete Code below.

Since the checkboxes in my menu are invisible, I work with label elements. Therefore, my checkboxes and the labels have IDs to assign them correctly.

Pages

Subscribe with RSS Subscribe to RSS - Theme development