<% properties.each_with_index do |property, index| %> <% if property[:type] == 'image' %> <% if property["title"].present?%> <%= property["title"] %> <%end%> <%if property[:coords].present? %> <% elsif coords.any? && !property[:coords].present?%> <% else %> <% end %> <%elsif property[:type] == 'title'%> <%= property[:content] %> <%elsif property[:type]== 'text'%> <%if property[:coords].present? %> <% else %> <% end %> <%= property[:content] %> <%end%> <% end %>