Fix page titles; add breadcrumbs.
authorEevee <git@veekun.com>
Sat, 5 Jun 2010 20:33:32 +0000 (13:33 -0700)
committerEevee <git@veekun.com>
Sat, 5 Jun 2010 20:33:37 +0000 (13:33 -0700)
splinext/forum/templates/forum/posts.mako
splinext/forum/templates/forum/threads.mako

index e4d3ffc..24dd875 100644 (file)
@@ -1,6 +1,19 @@
 <%inherit file="/base.mako" />
 
-<%def name="title()">${c.thread.subject} - ${c.thread.forum.name} - Forums</%def>
+<%def name="title()">${c.thread.subject} - Forums</%def>
+
+<%def name="title_in_page()">
+<ul id="breadcrumbs">
+    <li><a href="${url(controller='forum', action='forums')}">Forums</a></li>
+    <li><a href="${url(controller='forum', action='threads', forum_id=c.thread.forum.id)}">${c.thread.forum.name}</a></li>
+    <li>${c.thread.subject}</li>
+</ul>
+</%def>
+
+% if c.thread.post_count == 0:
+<p>Something terribly bogus has happened; this thread has no posts.</p>
+<% return %>
+% endif
 
 <div class="forum-post-container">
     % for post in c.thread.posts:
index a6b3f73..a27d4f1 100644 (file)
@@ -2,6 +2,13 @@
 
 <%def name="title()">${c.forum.name} - Forums</%def>
 
+<%def name="title_in_page()">
+<ul id="breadcrumbs">
+    <li><a href="${url(controller='forum', action='forums')}">Forums</a></li>
+    <li>${c.forum.name}</li>
+</ul>
+</%def>
+
 <table>
     % for thread in c.threads:
     <tr>