Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
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 :
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.
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.
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