[Zope] 2 Questions about links and files
Garry Steedman
gs@styrax.com
Thu, 6 Dec 2001 11:11:56 +0000
Gordon,
1. my preferred way of doing this is creating a folder called
"downloads" into which you drop the docs as file objects when you
make updates. you can then replace a static link with something like
this:
<dtml-in
"downloads.objectValues('File')"
sort=bobobase_modification_time
reverse size=1 orphan=0>
<a href="<dtml-var absolute_url>">newsletter</a>
</dtml-in>
though i prefer to create a dtml method something like this:
<dtml-with downloads>
<form method=post action= name=>
<select size=1 name=newsletters
onChange="top.location.href=newsletters.options[this.selectedIndex].va
lue">
<option selected>Choose a newsletter
<option>-------------------
<dtml-in "objectValues('File')">
<option value=&dtml-absolute_url;><dtml-var title>
</dtml-in>
</select>
</form>
</dtml-with>
if you call the method e.g. getNewsletters, you just use
<dtml-var getNewsletters> wherever you want a drop down to appear.
2. if you're on a *nix, you could probably hack up a script to pass
the word docs to a translator, but you should probably check out:
http://www.zope.org/Members/eric/MSWordDocument/
HTH,
garry
On 5 Dec 2001, at 23:22, Gordon Holtslander wrote:
From: Gordon Holtslander <gordon.holtslander@sk.lung.ca>
To: "Zope List (E-mail)" <zope@zope.org>
Send reply to: gordon.holtslander@sk.lung.ca
Subject: [Zope] 2 Questions about links and files
Date sent: Wed, 05 Dec 2001 23:22:28 -0600
> 1. I have a local file system directory that has Word doc sermon
> outlines in it. I'd like to have a link to the most recent of those
> files, but I don't want to change it manually. Is there some way to
> have the link point to the most recent file?
>
> 2. Obviously, not everyone has Word on their system. Is there some way
> to dynamically take a word doc from the directory and turn it into a
> "browser doc" so everyone can see it. I don't want to change the Word
> docs permanently because people still need and use them as Word docs.
> I don't want to have to manually transform all of them into html,
> although if that was the least painful method of dealing with this I
> could. There are about 85 docs now, but there are at least 2 and as
> many as 9 added each week.
>
>
> Thanks in advance,
>
> Gord
>
> Gordon W. Holtslander
> Director of Development &
> Information Technology
> The Lung Association - Saskatchewan
> gordon.holtslander@sk.lung.ca <mailto:gordon.holtslander@sk.lung.ca>
>
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
+-------------------------------------------+
Garry Steedman mailto:gs@styrax.com
Styrax Associates http://www.styrax.com/
"The Good Man has no shape."
+-------------------------------------------+