Re: does dexterity image have a sane URL

Philip Bauer <[email protected]>
Newsgroups gmane.comp.web.zope.plone.user
Message-ID <[email protected]>
You have to implement the marker-interface plone.namedfile.interfaces.IImageScaleTraversable because the "@@images"-view is bound to it.

e.g. in a behavior:

class IGallery(model.Schema, IImageScaleTraversable):

    gallery_image = NamedBlobImage(
        title=_(u'Gallery Image'),
        required=False,
    )


this way you can use seomthing like string:${context/absolute_url}/@@images/gallery_image/preview
	
Philip

--
Starzel.de
Philip Bauer
Adlzreiterstr. 35
80337 München
Tel: 089 - 189 29 533
Fax: 089 - 189 29 535
[email protected]
www.starzel.de

Am 11.09.2014 um 01:32 schrieb Gil Forcada <[email protected]>:

> El dj 11 de 09 de 2014 a les 00:58 +0200, en/na Espen Moe-Nilssen va
> escriure:
>> I am upgrading collective.js.supersize and want to add an option for using the original image (size)
>> 
>> Is there a way to construct a «sane URL» to the «full scale image» ?
>> 
>> I was hoping for something like:
>> self.context.absolute_url() + '/@@images/image/large’
> 
> 
> If your image field is called "image" and you have a scale named "large"
> then yes it should work just as you say (works for me TM).
> 
> Cheers,
> Gil
> 
>> 
>> 
>> Espen
>> ------------------------------------------------------------------------------
>> Want excitement?
>> Manually upgrade your production database.
>> When you want reliability, choose Perforce
>> Perforce version control. Predictably reliable.
>> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Plone-Users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/plone-users
> 
> 
> -- 
> Gil Forcada
> 
> [ca] guifi.net - una xarxa lliure que no para de créixer
> [en] guifi.net - a non-stopping free network
> bloc: http://gil.badall.net
> planet: http://planet.guifi.net
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk_______________________________________________
> Plone-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/plone-users

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk

_______________________________________________
Plone-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-users
signature.asc (application/pgp-signature, 496 B)
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQEcBAEBCgAGBQJUEUk3AAoJEOeXgSbn9GtJ/HYH/262pXr1/3u84StR1WOeSjhh
u3zs5PY7uUv3BY8RySeyXlKAO7+vZ96azK9TjQPx2400sJno9vJdBqOow0BhCAvT
H95kptjXcVJIdWQlJl1h677c9nFQPYexizIQhw1MQd0ctjhin4htCXMrZBtfYd67
qDSSkNU6znq1+upf6D5/rP4o6DEZ7Gz1+06+yAtLPbZ4EFsqHUrCGyOr4gBjd67S
DgbpsG7suQFypgeG4uwl/5WlCqPduXMkeXmlsWvOxlGXtSVovyVeiwXtn5IGJ0Mz
QfUTIvg/BBW34UukZBrUYKP5f+8G4C0u8twFvN6r8eMP3yIBcwwGzWuwIgeTsG0=
=dewH
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.