add i18n for layout and snippet
This commit is contained in:
1 parent
28612514e3
commit
ff2dffaeb4
14 files changed
+65
-49
No files matched your search
@@ -14,7 +14,7 @@ class ApplicationController < ActionController::Base
|
||||
@layout = @page.layout
|
||||
@page_options ||= {}
|
||||
@page_content = Liquid::Template.parse( @page.read_attribute( "content_#{I18n.locale}" ) ).render(@page_options)
|
||||
@layout_content = (@page.layout)? @layout.content : "{{page_content}}"
|
||||
@layout_content = (@page.layout)? @layout.read_attribute( "content_#{I18n.locale}" ) : "{{page_content}}"
|
||||
render :text => Liquid::Template.parse(@layout_content).render( 'page_content' => @page_content )
|
||||
else
|
||||
render :text => '404 Not Found'
|
||||
|
||||
Reference in new issue
Block a user