John Poltorak wrote:
I want to provide a set of links on a Zope site dynamically. ie don't want to hard code a number of links, but would like to load them from an external source which I can add to independently, but I have no idea as to how to set about it.
Any ideas?

I'd be quite happy to have the links in a text file with one link per line.

1) Create a script that returns a list of links:

## Script (Python) "linkList"

return [
  'link1',
  ...
  'linkN'
]

2) Use this script on your page. For example,

<tal:block repeat="link here/linkList">
  <span tal:replace="structure link" />
</tal:block>
_______________________________________________
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 )

Reply via email to