Closed dgdsp closed 12 years ago
The caption exists on the relationship so instead of .images
use .image_pages
E.g.
<% @page.image_pages.each do |i| %>
<%= link_to(i.image.url, :class => "figure", :title => "click to enlarge") do %>
<figure>
<%= image_tag(i.image.thumbnail("200x200#c").url, :class => "thumbnail", :alt => strip_tags(i.caption) ) %>
<figcaption>
<%= raw i.caption %>
</figcaption>
<figure>
<% end %>
<% end %>
If somebody would like to please document this in the readme that would solve this issue.
thank you!
fyi, the correct code would be:
<% @page.image_pages.each do |i| %>
<%= link_to(i.image.url, :class => "figure", :title => "click to enlarge") do %>
<figure>
<%= image_tag(i.image.thumbnail("200x200#c").url, :class => "thumbnail", :alt => strip_tags(i.caption) ) %>
<figcaption>
<%= raw i.caption %>
</figcaption>
<figure>
<% end %>
<% end %>
Yes, that's the exact code I gave you ;-)
ah, true. it's a little late ;-)
On 04.04.2012, at 04:19, Philip Arndt wrote:
Yes, that's the exact code I gave you ;-)
Reply to this email directly or view it on GitHub: https://github.com/resolve/refinerycms-page-images/issues/64#issuecomment-4946133
raises