[Zope] Icons in a product

Andrew Kenneth Milton akm@mail.theinternet.com.au
Fri, 8 Sep 2000 23:18:40 +1000


+-------[ Petr Knapek ]----------------------
| Hi Zopists,
| I would like to know if there is any possibility how to publish an icon
| on the web which is in www folder of my own created product. That is I
| want to put some icons into the www folder of my product and to have
| possibility to show them on the web. The problem with my own stylesheet
| of my product is similar. Is there any possibility to put it in the
| product (not ZODB) and later use it. In both cases I don't want put
| anything into /Control_Panel/Products/myProduct/ over web interface. I
| use Zope 2.1.6
| 
| I need to put any icon into my python product and later have possibility
| to call this icon on the web. Where to put it in my folder structure on
| the box and what the URL will be?
| 
| Thanks for help, Petr

In your __init__.py;

from ImageFile import ImageFile

misc_={'iconId': ImageFile('www/icon.gif',globals()).}

You then reference it is as:-

<img src="/misc_/YourProductName/iconId">

Please excuse any obvious mistakes in this I'm a little sloshed at the
moment d8)

-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd          |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068    |akm@theinternet.com.au|