Guest User

Untitled

a guest
Jan 21st, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <div data-quickedit-field-id="paragraph/196/field_profile_image/en/default" class="field field--name-field-profile-image field--type-image field--label-hidden field__item">
  2. <picture>
  3. <source srcset="/sites/default/files/styles/profile_large/public/paragraphs/image/profile/image1.jpg?h=74e1741d&itok=WLlku9ED 1x, /sites/default/files/styles/profile_large/public/paragraphs/image/profile/image1.jpg?h=74e1741d&itok=WLlku9ED 2x" media="all and (min-width: 992px)" type="image/jpeg">
  4. <source srcset="/sites/default/files/styles/profile_small/public/paragraphs/image/profile/image1.jpg?h=74e1741d&itok=p2VQAa0P 1x, /sites/default/files/styles/profile_small/public/paragraphs/image/profile/image1.jpg?h=74e1741d&itok=p2VQAa0P 2x" media="all and (min-width: 768px)" type="image/jpeg">
  5.  
  6. <img src="/sites/default/files/styles/profile_small/public/paragraphs/image/profile/image1.jpg?h=74e1741d&itok=p2VQAa0P" alt="Image" typeof="foaf:Image" class="img-fluid">
  7.  
  8. </picture>
  9. </div>
  10.  
  11. // Note that me adding the __profile_card below does work due to another hook I have running to allow me to specify which paragraph type to target
  12. function MYTHEME_preprocess_paragraph__profile_card(&$variables) {
  13. if ($variables['content']['field_rounded_profile_image'][0]['#markup'] == "On") {
  14. $variables['content']['field_profile_image']['attributes']['class'][] = "rounded-circle";
  15. }
  16. }
Add Comment
Please, Sign In to add comment