1. Chris Perkins
  2. c5t

Commits

Joseph Tate  committed 70f5380

Only show exerpts if there is a body

  • Participants
  • Parent commits 0cfb0e1
  • Branches default

Comments (0)

Files changed (1)

File c5t/core/templates/pages/index.mak

View file
  • Ignore whitespace
       </td>
     </tr>
     <% thetext = h.strip_tags(page.text) %>
+    % if (thetext is None):
+    <tr><td colspan="6" class="excerpt-td"><strong>Excerpt:</strong> No content</td></tr>
+    % else:
     <tr><td colspan="6" class="excerpt-td"><strong>Excerpt:</strong> ${thetext[0:1000]} ${len(thetext) > 1000 and '...' or ''}</td></tr>
+    %endif
     %endfor
 </table>
 </div>