I'm trying to do something with collective.xdv that just might be too
ambitious. I'd like some advice.

I'm trying so replace all image source urls from a specific element with urls
that point to a scaled version of the image. So '<img src="some-image" />'
should be '<img src="some-image/@@images/image/thumb" />'.

Use case: I'm taking entire Collage-items out of the Collage and putting them
in another layout. (I don't loop over individual img elements.) This is
actually a problem with Collage, but Collage "fixes" it by specifying
"width:100%" for images inside it. The downside of this is that content editors
_will_ insert 2Mb images which the user will have to download (only to be
rendered as 180x180). I could use this "fix" for the theme as well, but (while
acceptable for the Plone back-end) having such large images on a public site is
just immoral.

I read [1] that you can specify search-and-replace in xslt, but how could one
get this to work in collective.xdv?

(We use various image sizes in the site, so setting an alias for /view which
redirects to the scaled size will have side effects.)

Kees

[1] http://geekswithblogs.net/Erik/archive/2008/04/01/120915.aspx
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to