This forum is for assistance with theme development.

Paragraph with multiple layout types - Best way to achieve

Hi

There are multiple ways to achieve what I need but was wondering if anyone could explain the `Drupal` (Version 8) way of achieving this.

I have four very similar paragraphs:

1. Title, subtitle and HTML copy (1 column 3 rows, full page width)
2. Two columns, each column containing content as per point 1 above.
3. Three columns with point 1 content in each column.
4. No title or subtitle. List of unordered bullet points instead of the HTML copy 

custom an input form

Hello,

I'm using bootstrap as a theme but I don't like the suffix of the bar search of an exposed field so I want to custom it.

I used {{ kint(suffix)}} in the input--form--control.html.twig and I got this :

'#value' =>Drupal\Core\Render\Markup(1)

protected string ->string(111) "<span class="icon glyphicon glyphicon-refresh ajax-progress ajax-progress-throbb..."

So I would like to set the span class...

I tried to work with preprocess function like this :

Modifying the global custom text of a view, it only modifies one language

When modifying the global custom text of a view, it only modifies one language, the others do not.

For example, when I modify this: https://i.imgur.com/JXjRrcp.png

And I delete this: https://i.imgur.com/7GAwosT.png

the page in the default language is displayed like this: https://i.imgur.com/3VDTJp5.png

Get reference entity values in field level twig template

I have created one custom block having reference entity field. I have two templates to render design. One is 'block--bundle--block_name.html.twig' and another one is 'field--field-field_name.html.twig'. 

Inside block--bundle--block_name.html.twig I have below code with some custom HTML-

{% block content %}        {{ content }}      {% endblock %}

And field--field--field-field_name.html.twig contains below with some custom HTML-

taxonomy for only one vocabulary

Hello,

thank's first to help me.

Taxonomy view help me to show in a personal page all my articles put in a taxonomy tree.

But I would like to have specific behavior for a given vocabulary. So for this one to remove it from the default taxonomy view and make it a special one.
how to exclude this vocabulary from the first and create another only for it.

thank's

yo

Displaying content from field with multiple values

Hi! I'm quite new to drupal 8 and twig, but this is something I thought would be rader easy to do, but I still struggle with.

I have a node type curriculum with two entity reference fields called 'optional' and 'mandatory'. Each of these reference fields contains a list of nodes. In the template, '{{ content }}' displays the entities together and not separates like I want to display it. I thought I could just write {{ content.field_mandatory }} and {{ content.field_optional }} to display them separately, but this shows nothing.

What am I missing here? 

Pages

Subscribe with RSS Subscribe to RSS - Theme development