<% if @post = Post.where(:permalink => params[:id]).site(@agency.id).first @title = @post.title @description = @post.content ? @post.content[0..128] : @post.title @breadcrumbs = @post.breadcrumbs @place = @post.place if @post.place.permalink != 'anywhere' @places = Place.where('id <> ?', @post.place.id).within(100, :origin => [@place.lat, @place.lng]).limit(10) @in_country = [@place.id] if @places.length > 0 @places.each do |p| @in_country << p.id end end @experiences = Post.site(@agency.id).language(I18n.locale).where(:place_id => @in_country, :kind => VENDOR).order('created_at DESC') end @related = @post.related @categories = Category.where(['id IN (SELECT category_id FROM posts WHERE kind=? AND id IN (SELECT post_id FROM agency_posts WHERE agency_id=?) GROUP BY category_id)', BLOG, @agency.id]).order('title') @places = Place.where(['permalink <> ? AND id IN (SELECT place_id FROM posts WHERE kind=? AND id IN (SELECT post_id FROM agency_posts WHERE agency_id=?) GROUP BY place_id)', 'anywhere', BLOG, @agency.id]).order('title').limit(20) %>
<% photos = @post.attachments %> <% if photos && photos.length > 0 && a = photos.first %>
<% if a && a._type == 'video' %>
<%= raw a.html %>
<% elsif a && a._type == 'photo' %>
<%= @post.title %>
<%= @post.title %>
<% end %> <% if photos && photos.length > 1 %> <% if photos && photos.length > 0 %>
<% image_count = -1 %> <% photos.each do |a| %>
<%= image_tag(a.size(:thumb) , :title => a.title, :alt => a.title, :itemprop => 'image') %>
<% end %>
<% end %> <% end %>
<% end %> <% if @post.content_format && @post.content_format == 'html' %> <%= raw(@post.content) %> <% else %> <%= wiki_content(@post.content) %> <% end %>

<%= @post.meta1 %>

<%= t('Share your story!')%>

Had a great trip with the help of UNIGLOBE UNIGLOBE Sunburst Travel? Email it in (and any photo) to:

<%= @agency.email %>
<%= render_page('tat_subscribe_form') %>
<% else %>

Blog post not found

<% end %>