Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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">
- <picture>
- <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">
- <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">
- <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">
- </picture>
- </div>
- // 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
- function MYTHEME_preprocess_paragraph__profile_card(&$variables) {
- if ($variables['content']['field_rounded_profile_image'][0]['#markup'] == "On") {
- $variables['content']['field_profile_image']['attributes']['class'][] = "rounded-circle";
- }
- }
Add Comment
Please, Sign In to add comment