On 5/11/07, Frédéric <[EMAIL PROTECTED]> wrote: > On Friday 11 May 2007 20:12, Elvelind Grandin wrote: > > > > But I don't like that very much, because I have some XHTML code on the > > > controller side. How can I do that in a better way? > > > > Perhaps you can create a photo widget for it? > > Yes, you are right, this is a good solution. > > > > 2) As navigators have really bad interpolators when resizing pictures, > > > I want to do this on the sever side. But how can I define the size of > > > the photos in the template? Even if I find a way to let the designer > > > put the size of the photos, I will have to parse the template, which > > > is not really nice. Any idea to do that? Is there a way to give back > > > informations from a template to the controller at runtime? Maybe using > > > javascript? > > > > perhaps writing a custom controller for serving the images and send > > the sizes along with the url like > > "/images/000001.png?height=100&width200" and do the resizing on > > the fly (with caching of course). > > The idea is good, but I still need to retreive the size of the photo... And > I don't know how to do that if the size is in the template.
Why do you need to retrieve the size? > I don't know if it will be possible to do this without using a special xml > file, describing all the positions/sizes/attributes of photos/text. The > controller will have to parse this file, dynamically build the template > (xslt), and give it to the widget. More complicated :o/ > > -- > Frédéric > > http://www.gbiloba.org > > -- cheers elvelind grandin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

