How to apply an image style with TWIG ?

I have a site on Drupal 8.7 and I need to add an image that is hosted in my sub theme. It works with the code below but I want to apply the style with the machine name diaporama_lg_50 :

<img src="/themes/custom/bootstrap_subtheme_front_office/images/welcome.jpg?itok=edlv1_" alt="image bienvenue" typeof="Image" class="img-responsive">

How can I do this in TWIG ?

I have tried the code below but the image style does not work :

Drupal 9

Although Drupal 9 comes out next year about this time, I had a quick chance to look at what code is deprecated in some modules and installed 'Upgrade status' module on one of my Drupal 8 development sites. After testing a few dozen custom modules, I had only a single line of code to update for Drupal 9.

Since 9 is really just about code deprecation, it should be very straight forward to get stuff ready.

Roster Views with User data

I am creating a site that is an intranet portal for a company. All the users will be employees that work in different offices. I am adding several fields to the users to be used within the roster display. ie Cell phone, personal email, etc.

I will also have a content type of Office that will have fields relating to the individual locations. ie Address, phone, wifi code, etc.

How do I make a twig per bundle in my module

Hi

I've used Drupal Console to generate an entity type (Groups), so far so good, I've also added some bundles to this entity type on install through config (Group 1, Group 2, group 3).

What I want to be able to do is add additional default twig files for each of the bundles for the view add, edit pages etc.. from within my module.

Can anyone give me an example please of what I would need to change in my code to get that granular as I haven't figured it out from the reading I have been doing

my module.module

How to upgrade module to a specific version?

Hello,

I am wondering how I could update a module to a specific version instead of the latest version?

I cannot use drush or composer for this.

Thanks

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x