Skip to content

Commit

Permalink
Added global mode var to all templates to check what mode you're in: …
Browse files Browse the repository at this point in the history
…section, single, page, archive, search, tag

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2377 567b1171-46fb-0310-a4c9-b4bef9110e78
  • Loading branch information
technoweenie committed Oct 19, 2006
1 parent 4ae91c2 commit 6cd908d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,5 +1,7 @@
* SVN *

* Added global mode var to all templates to check what mode you're in: section, single, page, archive, search, tag

* Remove any notion of a template hierarchy, and the page template itself. Paged sections now default to the 'single' template.

* Added {{ mode }} so you can check what 'view' you're in.
Expand Down
2 changes: 1 addition & 1 deletion app/models/site.rb
Expand Up @@ -186,7 +186,7 @@ def accept_comments?
end

def render_liquid_for(section, template_type, assigns = {}, controller = nil)
assigns['site'] = to_liquid(section)
assigns.update('site' => to_liquid(section), 'mode' => template_type)
parse_inner_template(set_content_template(section, template_type), assigns, controller)
parse_template(set_layout_template(section, template_type), assigns, controller)
end
Expand Down

0 comments on commit 6cd908d

Please sign in to comment.