i have this zpt script running in plone. It will process all the image sinside the folder and create a thumbnail for every images. The problem is, it parses every file. I managed to hack it not to parse the index_html And I wonder how can i create a product from this script? eg:photoalbum Help me Thanks Hafiz Abdul Rahim <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" metal:use-macro="here/main_template/macros/master" i18n:domain="plone"> <metal:block fill-slot="top_slot" tal:define="dummy python:request.set('disable_border',1)" /> <div metal:fill-slot="main" tal:define="results here/objectValues; Batch python:modules['Products.CMFPlone'].Batch; DateTime python:modules['DateTime'].DateTime; b_size python:12;b_start python:0;b_start request/b_start | b_start;"> <h1>Gallery</h1> <div tal:condition="results" tal:define="batch python:Batch(results, b_size, int(b_start), orphan=1)"> <strong> <span i18n:translate="batch_x_items_matching_your_criteria"><span i18n:name="number" tal:content="python:len(results) - 1">234</span> images available inside this gallery.</span> </strong> <br/> <!-- Navigation --> <div metal:use-macro="here/batch_macros/macros/navigation" /> <div> <metal:block tal:repeat="result batch"> <div class="cardalbum" tal:define="name result/title; filename result/id; home result/absolute_url; portrait result/absolute_url;" tal:condition="not: python: filename == 'index_html'"> <a href="#" tal:attributes="href python:home + '/image_view'"> <img src="defaultUser.gif" alt="" border="0" width="150" height="100" tal:attributes="src portrait" /> <br /> <span tal:content="result/id">Title</span> </a> <br /> </div> </metal:block> </div> <!-- Navigation --> <div class="visualClear"> </div> <div metal:use-macro="here/batch_macros/macros/navigation" /> <div class="visualClear"> </div> </div> <div tal:condition="not: results"> <p><strong i18n:translate="description_no_results_found">No images.</strong></p> </div> </div> </html>
ghostrecon@cluemail.com wrote at 2004-8-18 21:51 -0700:
... It will process all the image sinside the folder and create a thumbnail for every images. The problem is, it parses every file. ... tal:define="results here/objectValues; ...
"objectValues" supports an optional argument "meta_types". It controls which objects are returned (based on their "meta_type"). It is either a meta_type (a string) or a sequence of meta_types. -- Dieter
participants (2)
-
Dieter Maurer -
ghostrecon@cluemail.com