This forum is for assistance with theme development.

Fields integer statement in twig template

Hello, I wanted to make a condition on an integer field. but the conditions do not work.
{% for item in items %}
    <div{{ attributes }}>{{ item.content }}
        {% if item.content   > 1 %}
            bedrooms
        {% else %}
            bedroom
        {% endif %}
    </div>
{% endfor %}
Do you have a solution please?

Thank you

Custom Query for a node type list and homepage

I have the node type Books, and i'd like that content/books would not show all books but 10 at a time, and in a specific order, and to be able to filter them.

Also I'd like to show 10 specific books on the frontpage, but the thing is that this 10 books change accordying to an api request.

I think its really simple and i'd like to avoid using Views, is it views the only and best way to do this?

Where do I change what is feeding content/books ? Should this be part of a theme or a module?, and if its a module what is the hook?

UI Kit Info and Libray YML

This is driving me mad.

I'm trying to load UI Kit the old fashioned way (without using an extension). I'm setting up my info.yml and libraries.yml. I can load the UI Kit framework CSS just fine, but can't seem to get the JS file to be included.

Here's what I have for the Info.yml:

One Google Map with a few location pins

What combination of modules would I need to setup a single map on a Drupal 7 site that would allow me to add nodes with locations that are shown on the map. For example store locations with a pin that can be click to show full details of each individual location?

Port custom theme From Drupal 7 to Drupal 8.

Help needed for converting a custom theme from D7 to D8.

I tried to port my custom theme but it didn't work.

Could you please port my custom theme for me?

The template is of a non profit musicband.....

custom a field with multiple values

Hi,

I have a field with multiple taxonomy terms (tags) and I want to add a span for each tag. 

But in the template views-views-field.html.twig, there is only :

{{ output -}} 

It's the output of all tags and not one by one. 

How can I custom each tag ?

Thank you.

Pages

Subscribe with RSS Subscribe to RSS - Theme development