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 keep running into cases with D8 where I cannot figure out how to grab what I need to use in a template file. In D7 it seems perhaps more straightforward where you just needed to track down a value in an array. In D8 it seems more involved, to understand classes used and methods you can use. I have used kint() but I really have trouble understanding the output to track down what I need.
I have Drupal 8 site and 4 Drupal 7 sites. I wrote D8 module to retrieve the list of all files in 4 D7 sites. I have done it by creating custom module that switch db connections and retrieve data and generate CSV. i am able to to get data from files_managed table like : public://RFP SA 0417.pdf. But I need to get public file path of these Drupal 7 sites by using mysql query so that I can list out file path in csv.
For example if public file path in D7 site is : '/sites/files/uploads/2016', I have to generate file path as /sites/files/uploads/2016/RFP SA 0417.pdf.
Hi,
I am working on a project using Group module. I need to assign a group role to a member programmatically.
I could figure out to get the group roles of a membership using loadByUserGroup() of group role storage class. But I am kind of lost in finding a way to set additional roles. Couldn't figure out an appropriate setter method.
I am pretty new to drupal.org, just learning things the hard way & enjoying it :-). I hope I am asking this question in the right forum.
My theme has styling for custom content type Article Teaser image (field_image) and I want to apply this styling to another content type (Review) teaser which uses a different image type (field_intro_image). I've copied the node--article--teaser.html.twig to node--reviews--teaser.html.twig which has {{content|without('field_image', 'links')}} within.
But the teaser image does not get displayed correctly. I've also tried {{content|without('field_intro_image', 'links')}}, how do I correctly do this?