This forum is for assistance with theme development.

How to check if a field value is empty

Hi,

I think this is one of most basic use cases but I really didnt find anything that solved my problem.

I just would like to know how to check with TWIG if a field value is not empty.

The following snippets didnt work:

{% if content.field_myfield %}
{% endif }

{% if content.field_myfield|length %}
{% endif }

{% if not empty content.field_myfield %}
{% endif }

I really dont know why this basic stuff is not documentated. Maybe I am wrong.

Thanks for your help.

Can't use smooth-scroll effect in Bootstrap-subtheme

I am in desperate need of help!

I spent all night yesterday trying to figure out why I can't get my site's content to align into a single-page format. I want you to be able to click on a menu link in my navigation bar and have the site smooth-scroll down to the content that you selected through that link.

An example of how this works:

http://www.bootstrapzero.com/theme/landing-zero/

So, I followed this very short tutorial down to the letter:

Theme like ZEN

Hello,

what base or starter theme would you use on place of ZEN?

I am now using Drupal 7 with ZEN on some projects and I use Compass, Sass etc.

For a new web project I will use Drupal 8. It will be company/commercial web site. There will be added and integrated simple eshop to it, later (in months) - I count with Drupal Commerce for this.

So, I dont now, what base or starter theme to use (as ZEN is not available for D8). Some good advice?

Thnks very

css not included | drupal 8

I have one problem. css not included in drupal 8. I want include style.css but has some problem.

movies.info.yml

Rename "Read More" in D8 teaser

Hello all,

I wanted to rename "read more" in teaser (node--blog--teaser.html.twig) to something like "Continue" or anything else.
Can anyone help?

Many thanks

Pages

Subscribe with RSS Subscribe to RSS - Theme development