- page.page_blocks.order(:order).each do |block| %div.row.page_block{ id: block.div_id } - if block.name %h2 = block.name - block.thumbnails.each do |thumb| %div.thumbnail.col-md-4.col-sm-6 - if thumb.image = image_tag thumb.image.file - else = image_tag '/images/default.jpg' %h4 = link_to raw(thumb.content), thumb.link - block.text_boxes.each do |box| %p = raw box.content - block.image_boxes.each do |box| %div.col-md-6{ style: 'overflow: hidden'} - if box.image = image_tag box.image.file - else = image_tag '/images/default.jpg' %h3 = box.heading %p = box.content - block.blog_feeds.each do |feed| - PagesCms::Article.all.limit(feed.limit).each do |post| %h4 = post.title %p = raw truncate(post.content, length: 200) %div = link_to 'read more', article_path(post) - post.tags.each do |tag| = link_to tag, articles_path(search: tag), class: 'btn btn-default btn-xs'