<%= t('RELATED POSTS')%>
-
<% @related.each do |p| %>
- <%= p.title %> <% end %>
<%= t('RELATED POSTS') %>
-
<% @related.each do |p| %>
- <%= p.title %> <% end %>
% if @post = Post.where(:permalink => params[:id]).site(@agency.id).first @title = @post.title unless @description = @post.summary @description = @post.content ? @post.content[0..128] : @post.title end @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) %>
Blog post not found
<% end %>