This forum is for assistance with theme development.

Drupal 8 Block IDs - Easy way to change the ID?

From what I can see in the markup generated by Drupal 8 when looking at blocks I need to style, I'm seeing wonky IDs, especially if I omit titles from the blocks (I think Drupal is falling back on the description to use for the generated ID?).

I shouldn't need to delete an entire block just to change an ID of said block, should I? Is there an easy way to edit block IDs?

Tokens Not Working in "No Results Behavior" in View With Contextual Filters

I have a Drupal 7 view with contextual filters and I am unable to include any tokens in "Global: Text Area (no results available)".  Replacement patterns are listed, but none of them are working.  I have tried the various text formats (Full, Filtered, Plain, Unfiltered) with no luck.  I have used tokens in the past with no issues.  Any suggestions? 

A 'misterious' font in a view popup select list field

I'm getting a really big headache.
I set one font for the main theme and another for the admin theme.

When I open an 'editable view' with 'colorbox node' the select field shows the text with the correct font in the selected option, but a different font in the dropdown list.

A font that I don't know where it comes from, since I checked all the modules involved and in the deve tools I can't see any css tags overwriting the theme font.

Who helps me to understand what is happening?
Many thanks

Hero image slider returns to first picture after downloading a picture from the slider

My website uses a hero slider and if you are on, say, the 4th bullet and select download, after the image downloads, the slider doesn't stay on the 4th image, but rather goes back to the start of the slideshow. Is there a way to stay on the image you left off on before downloading?

Thanks!

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' %} ...

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:

Pages

Subscribe with RSS Subscribe to RSS - Theme development