Skip to content

Commit 3c18c82

Browse files
committed
feat: enhance template rendering logic to differentiate between static pages and partials
1 parent 5defc82 commit 3c18c82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

22
<%= render layout: 'better_together/content/blocks/block', locals: { block: template } do %>
3-
<%= render partial: template.template_path, locals: { block: template, content: template.content_data }, cached: true %>
3+
<% if template.template_path.start_with?('better_together/static_pages/') %>
4+
<%= render template: template.template_path, locals: { block: template, content: template.content_data } %>
5+
<% else %>
6+
<%= render partial: template.template_path, locals: { block: template, content: template.content_data }, cached: true %>
7+
<% end %>
48
<% end %>

0 commit comments

Comments
 (0)