Changeset 262:d3952f6bf6d5

Show
Ignore:
Timestamp:
02/08/10 21:52:12 (6 months ago)
Author:
rgrp
Branch:
default
Message:

[templates,controllers/site][s]: change blog link to news and add in word of the week (wotw) proxy.

Location:
shakespeare
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • shakespeare/config/routing.py

    r260 r262  
    2727    map.connect('home', '/', controller='site', action='index') 
    2828    map.connect('about', '/about/', controller='site', action='about') 
     29    map.connect('news', '/news/', controller='site', action='news') 
     30    map.connect('wotw', '/wotw/{url:.*}', controller='site', action='wotw') 
    2931    map.connect('guide', '/guide/', controller='site', action='guide') 
    30     map.connect('news', '/news/', controller='site', action='news') 
    3132    map.connect('/resource/{action}/{id}{url:.*}', controller='our_resource') 
    3233    map.connect('/material/{action}/{id}', controller='text') 
  • shakespeare/controllers/site.py

    r252 r262  
    4646  <rule> 
    4747    <replace content="children:#content" theme="children:#content" /> 
     48    <!-- 
    4849    <append content="children:#sidebar" theme="children:#primary" /> 
     50    --> 
    4951  </rule> 
    5052</ruleset> 
     
    7880        return render('index.html') 
    7981 
     82    def guide(self): 
     83        return render('guide.html') 
     84 
    8085    def about(self): 
    8186        if DELIVERANCE_ENABLE: 
     
    8388        else: 
    8489            return render('about.html') 
    85  
    86     def guide(self): 
    87         return render('guide.html') 
    8890 
    8991    def news(self): 
     
    9496            return self.deliverance(request.environ, self.start_response) 
    9597        else: 
    96             return '' 
     98            return render('index.html') 
     99 
     100    def wotw(self): 
     101        if DELIVERANCE_ENABLE: 
     102            # modify path for proxy to strip out /news/ 
     103            currentpath = request.environ['PATH_INFO'] 
     104            request.environ['PATH_INFO'] = '/category' + request.environ['PATH_INFO'] 
     105            return self.deliverance(request.environ, self.start_response) 
     106        else: 
     107            return render('index.html') 
    97108 
    98109    @property 
  • shakespeare/templates/layout_base.html

    r255 r262  
    6464      <li><a href="${h.url_for('guide')}">Guide</a></li> 
    6565      <li><a href="${h.url_for('about')}">About</a></li> 
    66       <li><a href="http://blog.openshakespeare.org">Blog</a></li> 
     66      <li><a href="${h.url_for('news')}">News</a></li> 
    6767    </ul> 
    6868    <h3 class="hidden">In this section:</h3>