[Product-Developers] Re: Integrating collective.carousel and collective.contentleadimage
harald at webmeisterei.com
Wed Feb 17 09:22:18 UTC 2010
somehow an import of collective.leadimage made it into trunk with
the import should be conditional to not break collective.carousel for people
that did not install leadimage.
Dylan Jay wrote:
> I've just uploaded the work I've done on this
> I opted for doing the work in the collective.carousel package and
> using the register a new tile type method conditionally on the
> existence of contentleadimage.
> However I've also made some other changes.
> - the autoresizing was somewhat broken so I've made changes the the js
> to make it wrap text properly and handle larger size content.
> - the css wasn't very generic and doesn't play nice with normal
> portlet layouts
> - added a pause button to comply with accessibility standards.
> I haven't made similar changes to the viewlet version so these changes
> aren't complete.
> I'm also not sure if it's possible to merge these changes in.
> Dylan Jay, Plone Solutions Manager
> On 17/02/2010, at 12:55 AM, Maurits van Rees wrote:
>> For http://www.milieudefensie.nl (Friends of the Earth Netherlands) I
>> am looking into integrating collective.carousel (show items of a
>> collection in a viewlet or portlet, and show the next after a while,
>> to all content types, with archetypes.schemaextender).
>> In essence it is easy enough (once you throw away your initial idea
>> after getting some strange Unauthorized errors...) and I did that on a
>> branch of collective.carousel:
>> Relevant changeset:
>> Since it is so small I can just paste the few lines I added:
>> <a href="#"
>> tal:define="field python:context.getField('leadImage')"
>> tal:condition="python:field and field.get_size(context) != 0"
>> tal:attributes="href python:(item_type in use_view_action) and
>> item_url+'/view' or item_url;">
>> <img src="" alt=""
>> tal:replace="structure python:field.tag(context,
>> scale='thumb', css_class='tileImage')" />
>> I wonder if it is better to add this in one of these two packages or
>> to create a new very small package to integrate this; seems overkill
>> for just these few lines that do not hurt when
>> collective.contentleadimage is not available (except the time needed
>> to check for the existence of the field, which should hardly be
>> Any objections from the Jarn folks (mostly Denys Mishunov) to merge
>> this to trunk? Tests pass with and without contentleadimage on Plone
>> 3.3 and 4.
>> And any plans to create an actual release of this? :-)
>> BTW, an alternative solution in collective.carousel would be to keep
>> the current tile unchanged and register a different one when
>> collective.contentleadimage is installed:
>> + zcml:condition="not-installed collective.contentleadimage"
>> + <browser:page
>> + zcml:condition="installed collective.contentleadimage"
>> + name="carousel-view"
>> + for="Products.ATContentTypes.interface.IATContentType"
>> + template="templates/lead_image_tile.pt"
>> + permission="zope2.View"
>> + layer="..interfaces.ICollectiveCarouselLayer"
>> + />
>> Maurits van Rees | http://maurits.vanrees.org/
>> Work | http://zestsoftware.nl/
>> What are you going to create today?
>> Product-Developers mailing list
>> Product-Developers at lists.plone.org
Webmeisterei GmbH - Büro für Netzfragen
Tel: +43 5572 908877, Fax: +43 5572 908877-66
Steinebach 18, A-6850 Dornbirn
More information about the Product-Developers