[Zope] Creating links dynamically
John Poltorak
jp at warpix.org
Tue May 31 16:01:48 EDT 2005
On Tue, May 31, 2005 at 02:51:18PM -0500, J Cameron Cooper wrote:
> John Poltorak wrote:
> >>Well, it's really easy. Create 'linkList' (Python Script) in the folder
> >>where you page lives or somewhere higher in folder hierarchy:
> >>
> >>## Script (Python) "linkList"
> >>return [
> >> ('http://www.google.com/', 'Google'),
> >> ('http://www.yahoo.com/', 'Yahoo'),
> >>]
> >>
> >>
> >>If you page is DTML Method, you can do the same using <dtml-in> tag.
> >
> >
> > Thanks for the suggestion, but I really am a novice when it comes to all
> > this and you are probably presuming more expertise than I have.
> >
> > I created a Page Template exactly as you suggested. It's called test and
> > is in the testsite folder - the contents are pasted from your example.
> >
> > The python script was pasted into a file object called linkList which has
> > a Content Type of text/x-unknown-content-type.
>
> Why did you put it in a File? Why not a "Script (Python)"?
I'm using a remote site and only have access via Zope's ZMI. Can I create
a script through that?
> --jcc
>
> --
> "Building Websites with Plone"
> http://plonebook.packtpub.com/
--
John
More information about the Zope
mailing list