1

I've been attempting to add my node Title to the image ALT and TITLE fields during their output in a view.

I am using the Media module to mange my images, and I have included the image_url_formatter module to offer up the image URL information in my view.

I attempted the advice in this post How to add alt and title attributes to an image gallery View? and it almost works however this is occurring:

Within the View, If I alter the Image field to output the Image URL this works and I get my option of URL information in both preview and actual view. If I then attempt to Rewrite the results, I suffer from two issues.

  1. The [field_image-fid] outputs a numerical number only. i.e 1 or 4 etc...
  2. The [field_image-width] & [field_image-height] output the actual image height and width rather then the selected image style, i.e. Thumbnail.

Anyone suffered from these issues, or know the answer?

1

Is the title-field before the Global text-field? Can you provide a screenshot of your field-settings in the View? (the most left column)

  • yes all fields are before the global text field. And this is off the mark, as title is fine, its Image URL that is broken – Purplemonkey Mar 31 '15 at 15:27
  • Ah, like that. Sorry, can't help you. Did you try hide & rewrite the [field_image-id]? With rewrite, you force the field to be styled in your way. – MatthijsG Mar 31 '15 at 20:25
0

Did you try marking all fields Exclude from display? Then, at the end, add another Global text field and write down your code using Views tokens. Every field should be declared above Global text field. From there, you can play with rewriting fields, although they are excluded.

  • hi, I just tried that, but the only token available to global text is field_image. if I exclude from display the image and rewrite its output, then the global text has the same problem. – Purplemonkey Mar 30 '15 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.