[Twisted-web] Use nevow:pattern and nevow:attr to render a list of options.

Marian Schubert marian.schubert at gmail.com
Thu Jul 12 10:49:27 EDT 2007


Hi,

it should work like this:

<option n:pattern="item" n:render="option">
  <n:attr name="value"><n:slot name="value" /></n:attr>
  Option 1
</option>

and in option renderer use context.fillSlots('value', ...)

cu,
Maio

On 7/6/07, Daniel de la Cuesta <daniel.cuesta at iavante.es> wrote:
>
>    Hi,
>
>  I am using Divmod Nevow to render html pages.
>
>  I want to produce this html dinamically using the templates mechanism:
>
>  <select>
>      <option value=1>Option 1</option>
>      <option value=2>Option 2</option>
>      ....
>  </select>
>
>  I have used the nevow:pattern tag to render all the "option" tags but I
> don't know how to add the "value" atribute to each "option".
>
>  How can I do that using templates?
>
>  Thak you.
>
> --
>
>
> Daniel de la Cuesta Navarrete
>  Técnico de Desarrollo de Software
>
> FUNDACIÓN IAVANTE
>  daniel.cuesta at iavantefundacion.com
>  Tel. 951 015 300
>
>
> Este correo electrónico y, en su caso, cualquier fichero anexo, contiene
> información confidencial exclusivamente dirigida a su(s) destinatario(s).
> Toda copia o divulgación deberá ser autorizada por IAVANTE.
>
> This e-mail and any attachments are confidential and exclusively directed to
> its adressee(s). Any copy or distribution will have to be authorized by
> IAVANTE.
>
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
>


More information about the Twisted-web mailing list