This post originated from an RSS feed registered with Python Buzz
by Ng Pheng Siong.
Original Post: Previous | Main | Next
Feed Title: (render-blog Ng Pheng Siong)
Feed URL: http://sandbox.rulemaker.net/ngps/rdf10_xml
Feed Description: Just another this here thing blog.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ng Pheng Siong
Latest Posts From (render-blog Ng Pheng Siong)
Advertisement
Many blogware, when displaying a single blog entry, presents a little
navigational menu like this:
<previous> | Main | <next>
This feature is now available in COREblog 1.0. I decided to back port
the feature into the version of COREblog that I use.
First, add the following methods to Entry.py from the 1.0 version:
entry_url
get_previous_entry
get_next_entry
previous_entry_item
next_entry_item
Then, refresh the COREblog product from Zope's ZMI.
Next, add the navigational menu to the DTML method entry_html :
<dtml-unless preview>
<div align="center" id="left_right_nav">
<p>
<dtml-in previous_entry_item>
« <a href="<dtml-var entry_url>"><dtml-var title></a> |
</dtml-in>
<a href="<dtml-var blog_url>">Main</a>
<dtml-in next_entry_item>
| <a href="<dtml-var entry_url>"><dtml-var title></a> »
</dtml-in>
</p>
</div>
</dtml-unless>
I gave this chunk of HTML-from-DTML an id so that it may be styled via
CSS.
And that's it. Now, when you view an individual entry on my blog, you'll
see the menu just below, ahem, my calligraphy.
Read: Previous | Main | Next