John Poltorak wrote:
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?
Certainly. It's in the dropdown. In fact, that's why I used the silly
canonical name "Script (Python)" rather than "Python script".
--jcc
--
"Building Websites with Plone"
http://plonebook.packtpub.com/
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )