diff --git a/app/views/admin/communication/blocks/templates/posts/_preview.html.erb b/app/views/admin/communication/blocks/templates/posts/_preview.html.erb index d99f7bbb49fc513f8c2cb05bc3b7b8019f8f35b7..8c5a3d65c132d178d4af1fca6d12eda8011daf99 100644 --- a/app/views/admin/communication/blocks/templates/posts/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/posts/_preview.html.erb @@ -6,7 +6,6 @@ end class_name += " block-posts--" + @block.template.layout date_format = "%e %B %Y" -highlight_post = @block.template.selected_posts.first %> <section class="<%= class_name %>"> <div class="container"> @@ -55,7 +54,9 @@ highlight_post = @block.template.selected_posts.first <% end %> </div> - <% elsif @block.template.layout === "highlight" %> + <% elsif @block.template.layout === "highlight" + highlight_post = @block.template.selected_posts.first + %> <div class="highlight"> <div class="highlight-post"> <article class="post" itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">