0

I just installed the Photo Frame EE add-on and I'm really impressed with the image editing functionality. I'm unsure, however, as to whether it's possible to include a variable in the image alt attribute? Before installing Photoframe, my EE template markup was as follows for the image field in question:

<div class="item-photo">
    <img src="{item_photo}" alt="{item_name} photo">
</div>

After integrating Photo Frame as the field type for {item_photo}, I changed the EE markup as follows:

<div class="item-photo">
    {item_photo}
</div>

Photo Frame generates the full <img> markup, and creates an alt attribute from the name of the published channel entry. I'm wondering how I might customize the value of this attribute, as I've done with my original EE template markup.

Thanks for any assistance here from those who may be using the Photo Frame add-on; and please let me know if my question is unclear in any way.

1

You can use the same template code as before. Just need to add {item_photo:url}

<div class="item-photo">
    <img src="{item_photo:url}" alt="{title} photo">
</div>
1
  • Oh wow, it's that simple-- thanks very much Max! – nickpish Jan 28 '15 at 2:36

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.