New answers tagged

0

To get the uri of remote video in node--page.html.twig try with: node.field_video.entity.field_media_oembed_video.value


0

This is the best way on Drupal 8, create a custom module with Controller and send a variable to Twig: $pictureUri = $user->user_picture->entity->getFileUri(); $style = \Drupal::entityTypeManager()->getStorage('image_style')->load('thumbnail'); $urlPicture = $style->buildUrl($pictureUri);


0

I know it's horrible, but if nothing else works: {{ link|replace({'internal:':''}) }} My situation: accessing a Link field via an overridden views template: views-view-fields.html.twig I had to get the variable from: row._entity.field_machine_name.value.0.uri (I gave up trying to use the fields variable, you can seemingly get a .content property out of ...


0

I don't think there is any build in Drupal helper function to do so, there is drupal_http_build_query to build query but it support only &as separator. I think you should get your hand dirty a little bit and implement something for your use case take a look at this discussion about how to prevent drupal_goto from encoding plus and comma characters? for ...


Top 50 recent answers are included