fix context references
This commit is contained in:
parent
4ceb9bab41
commit
d11b8388f2
1 changed files with 7 additions and 2 deletions
|
@ -224,7 +224,7 @@ class Middleman::Base
|
|||
|
||||
return unless self.class.execute_before_processing!(self, found_template)
|
||||
|
||||
context = sitemap.get_context(@original_path) || {}
|
||||
context = sitemap.get_context(full_path(@original_path)) || {}
|
||||
|
||||
@options = context.has_key?(:options) ? context[:options] : {}
|
||||
@locals = context.has_key?(:locals) ? context[:locals] : {}
|
||||
|
@ -258,6 +258,11 @@ class Middleman::Base
|
|||
|
||||
layout_path, *etc = resolve_template(local_layout, :preferred_engine => layout_engine)
|
||||
|
||||
if !layout_path
|
||||
local_layout = File.join("layouts", local_layout.to_s)
|
||||
layout_path, *etc = resolve_template(local_layout, :preferred_engine => layout_engine)
|
||||
end
|
||||
|
||||
throw "Could not locate layout: #{local_layout}" unless layout_path
|
||||
|
||||
render(layout_path, locals) do
|
||||
|
|
Loading…
Reference in a new issue