Sounds interesting! I hope it will work seamlessly with my other things stored in ZCatalogs... ZPhotoAlbum will be its own ZCatalog. If you want to search it by itself you can, or you can select multiple ZCatalogs to search. This should be what you want, let me know otherwise.
The new format of referencing photos in dtml gives me headaches...
If I try to step through an unknown number of photos in a folder, I would do:
<dtml-in "objectIds('Photo')"> <dtml-var "_['sequence-item'](REQUEST, pdcookie='true', border=0)"> </dtml-in>
Sure. I can see that. Try this. <dtml-in "objectValues('Photo')"> <dtml-var "tag(REQUEST, pdcookie='1', border=0)"> </dtml-in>
But this does not work. I tried several versions of this - nothing. How would you do this???
Let me know right away if this does not work.
Next, I have Articles that store the name of a top-image in a property called topimage. How can I reference the original photo object? The old way was :
<img src="/<dtml-var "getpath(data_record_id_)">/<dtml-var topimg>/thumbnail" border="0" alt="<dtml-var title>" align=right>
How can I transform this to the new way???
This came up on the list last night. Try this. <dtml-with "_.getitem(topimage,0)"> # Return a reference to the Photo object that is named in topimage # Place the Photo on top of the namespace stack <dtml-var "tag(display='thumbnail', border=0)"> # Call the tag method of the current object with parameters. # The REQUEST variable isn't necessary because we only want thumbnails. # Note that the alt tag defaults to the title # Further note that the /thumbnail method-interface is deprecated, all # displays are set through the display parameter. </dtml-with> I am open to suggestions on making this dtml-interface better, but I found this to be the most flexible so far. It also reads more like Zope code, but it takes a little getting used to. I may still have much to learn here. Drew
Hi Drew, there is one problem I think with the default display size when using cookies. If no cookie is present, the photo displays in the preset size of preview, but this is done in the browser by setting height and width accordingly, not by displaying a properly sized picture. The browser is transferring the whole picture!!! Could you please take a look at this or is this my fault?? Saving the default sized picture to disk proves it: it has the full picture size! I noted another new problem while downloading. there seems to be a newly introduced mime problem. The picture is no longer recognized as such but is downloaded as application/octet-stream. The same happens if you try to access a picture directly in the browser like http://zope.server.com/image The browser will try to download it. The earlier photo version did not have this problem Jochen
participants (2)
-
Andrew Lahser -
Jochen Haeberle