public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
Added global mode var to all templates to check what mode you're in: 
section, single, page, archive, search, tag

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@2377 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Wed Oct 18 19:28:01 -0700 2006
commit  6cd908d31b0f5661cf7f23913272e50d689c3598
tree    7dd0b4584bb6c891a336d667b15f43e13fe9d012
parent  4ae91c21e8be25a490b46a4a76b46a862112fff6
...
1
2
 
 
3
4
5
...
1
2
3
4
5
6
7
0
@@ -1,5 +1,7 @@
0
 * SVN *
0
 
0
+* Added global mode var to all templates to check what mode you're in: section, single, page, archive, search, tag
0
+
0
 * Remove any notion of a template hierarchy, and the page template itself. Paged sections now default to the 'single' template.
0
 
0
 * Added {{ mode }} so you can check what 'view' you're in.
...
186
187
188
189
 
190
191
192
...
186
187
188
 
189
190
191
192
0
@@ -186,7 +186,7 @@ class Site < ActiveRecord::Base
0
   end
0
 
0
   def render_liquid_for(section, template_type, assigns = {}, controller = nil)
0
- assigns['site'] = to_liquid(section)
0
+ assigns.update('site' => to_liquid(section), 'mode' => template_type)
0
     parse_inner_template(set_content_template(section, template_type), assigns, controller)
0
     parse_template(set_layout_template(section, template_type), assigns, controller)
0
   end

Comments

    No one has commented yet.