How do I get the value of a field to do an if statement

Hi

Spent a couple of hours trying to figure out something I assumed would be really easy but I'm not getting it

I have over ridden my views-view-fields.html.twig file and that works fine

I render my fields using {{ fields.uid.content }} and that also works fine

What doesn't is if I try and run an if statement over it. 

fields.uid.0 returns nothing

fields.uid.value also returns nothing

fields.uid causes an error

so how do I do something like 

{% if fields.uid.content == 'John' %} ...

Use Symfony Bundle in Drupal 8

Hello,
I'm a coder and I'm merely new in Drupal World.
I want to know if it's possible to use a Symfony Bundle in D8 (as a module for example).

In fact, the question is more like :" How we can use a Symfony in a Drupal 8 site ?".

I found some topics but there are really old.

Thanks for the help !

twig template no file name suggestions

I want to change something in twig, but one of my template doesn't have suggestion name.

 THEME DEBUG 
 THEME HOOK: 'views_mini_pager' 
 BEGIN OUTPUT from 'themes/bootstrap/templates/views/views-mini-pager.html.twig' 

I found this code on forum:

Views: Displaying as a responsive Grid of Teasers with grouping ?

I haven't found a way to do the following:

In a view, I want to display results as content (for example teasers) in a grid, grouped by a field value.

The grid gives the option to group by fields only when results are displayed as fields.

Is there any way to achieve the desired result?

When to build a custom entity programmatically versus YML

I don't fully understand when I should build a custom entity via YML or programmatically. I can do both, but I don't fully understand the tradeoffs of each or why it should be done one way versus another.

Is it basically that they offer different levels of customization: YML doesn't allow me to customize the storage schema or build custom routes, etc?

Difference between last installed schema and current schema.

Hello, on the last update I ran into the issue with schema update.

We overrided content entity class with id = menu_link_content. And we added new field called machine_name by this method:

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x