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.

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

Attachment: pgp8c9U4TgNC8.pgp
Description: PGP signature

Reply via email to