This forum is for assistance with theme development.

Twig: How to list out taxonomy with multiple values + custom fields

I have this which works for the title only.    How can I get the value of field_nmls?   It's blank for me.

    {% for item in content.field_team_members %}
      {% if item['#title'] %}
        <div class="field-item">{{ item['#title']  }}</div>
        <div class="field-item-2">

          {% if item.hasField('field_nmls') == true %}
           {{ item.field_nmls.value }}
          {% endif %}
        
        </div>
      {% endif %}
    {% endfor %}

Error InvalidArgumentException</em>: Placeholders must have a trailing [] if they are to be expanded with an array of values

I have been submitting an error when sending my Drupal form, the code is designed to insert the values of a select type field in my database. I do not know what I'm failing but I've been trying to find an answer for over a week and I could not.

/*METODO CONSTRUCTOR DEL FORMULARIO -  buildForm*/

Public function buildForm(array $form, FormStateInterface $form_state) {

  $form['WishForm'] = [
    '#type' => 'fieldset',
    '#title' => $this->t('Favorites'),
  ];

Add css by content type gives me theme error

Really new about D8

At the moment i can able to add css to home page only with this code:

corolla.libraries.yml

customization:
  css:
    theme:
      styles/css/corolla.custom-layout.page.css: { weight: 200 }

corolla.theme

Problem using gulp inside Zen sub-theme

Hi all. I'm trying to develop a sub-theme from Zen in Drupal 8, using Gulp as the task runner. Having some problems I hope someone can shed some light on.

I'm running things inside Docker containers using the 8.6.2-apache offical Drupal image, and the latest official MariaDB image.

I've got the sub-theme created, and it is set and working as my default theme. No issues there.

However, when I try to run gulp I get a TON of errors.

Here's the process I'm following.

1. Launch MariaDB container

Forum with anonymous posters' names

Hey 

My objective
I have to create a forum with Drupal 8 that allows anonymous visitors to post new forum topics and comments (under topics) and I also have to show the anonymous posters' names which are filled by user input.

I created a field ("field_name") under the "Forum topic" content type (/admin/structure/types/manage/forum/fields) to hold the anonymous poster's name and made filling it a requirement.

d8 switch view_mode of single paragraphs entity

Hi folks,

I use paragraphs module for content of the nodes full view. My users like to upload several images on a node so I've used two paragraph types for images, one to display images in masonry style, one for slideshows. Unfortunately, if you want to switch the display after uploading the images you have to delete fEx the masonry paragraph and upload all images again on the slideshow paragraph :(

Pages

Subscribe with RSS Subscribe to RSS - Theme development