The Artima Developer Community
Sponsored Link

Python Buzz Forum
Previous | Main | Next

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ng Pheng Siong

Posts: 410
Nickname: ngps
Registered: Apr, 2004

Ng Pheng Siong is just another guy with a website.
Previous | Main | Next Posted: Oct 23, 2004 8:04 AM
Reply to this message Reply

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

Topic: Conferencing Previous Topic   Next Topic Topic: Back To The Future

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use