[Zope] publishing headlines

Anthony Pfrunder s341625@student.uq.edu.au
Wed, 18 Aug 1999 08:07:33 +1000 (GMT+1000)


On Tue, 17 Aug 1999, Tim Wilson wrote:

> Hey Zopesters,
> 
> I'd like to publish science and technology headlines on our science
> department's Web site. The headlines would be culled from an external site
> such as the BBC. This would be akin to the Slashboxes on Slashdot.
> 
> Being a Zope newbie, I'd appreciate it if someone could provide an outline
> to implementing this feature. I'm not sure how to begin. This would
> obviously be of use to the Zope Portal Toolkit.

Short answer: look for my example.bbe next week
Long Answer:
	Assuming you want three columns you could create two folders
(left, right) and set the header to:

	# Table stuff
	<TR>
	  <TD>
	    <dtml-in left>
	      <dtml-sequence-item>
	    </dtml-in>
	  </TD>

	  <TD>
	
	the footer to the same as header except using right.

Then, in left or right put a DTML Method:
	slashdot:
		<dtml-var "slurp(url = ...)">

Then, in the Extensions folder of Zope2:
	slurp:
		# Check Python for exact syntax
		import urllib
		x = urllib.url(url)
		return x.read()

And you have it!  Modify the slurp to reformat the slurp as required

Cheers,

Anthony Pfrunder