Skip to content

Instantly share code, notes, and snippets.

@pigeonflight
Last active July 20, 2019 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pigeonflight/48a4c4f78be98d9674e5a509b830f786 to your computer and use it in GitHub Desktop.
Save pigeonflight/48a4c4f78be98d9674e5a509b830f786 to your computer and use it in GitHub Desktop.
example themefragment for Plone collective.themefragments (iteration over folder of images using @@contentlisting)
<div class="wrapper" tal:define="portal context/@@plone_portal_state/portal; image_scale portal/@@image_scale">
<tal:block tal:repeat="item context/@@contentlisting">
<tal:block tal:define="url item/getURL; portal_type item/portal_type">
<a href="${url}" tal:condition="python:portal_type == 'Image'" class="item-${item/portal_type}">
<img src="${url}/@@images/image/large" />
<p tal:content="item/title" class="title">1st item</p>
</a>
</tal:block>
</tal:block>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment