[Zope] Dynamic ordering of DTML-IN?

Diego Rodrigo Neufert diego@magicwebdesign.com.br
Tue, 23 Jan 2001 11:02:55 -0200


You can use something like:

<dtml-if "orderby=='firstname'">
	<dtml-in "sql_search(search='foo')" sort=firstname>
<dtml-elif "orderby=='lastname'">
	<dtml-in "sql_search(search='foo')" sort=lastname>
</dtml-if>

On Tuesday 23 January 2001 10:39 am, you wrote:
> Another one from the "my brain don't work" side of the tracks:
>
> I have a staff list that I want to be orderable by first or last name.
> So I have buttons for each that link thus:
>
> <a href="staff?orderby=firstname"> etc
>
> The idea is that that feeds over to the DTML-IN tag thus:
>
> <dtml-in "sql_search(search='foo')" sort=orderby>
>
> But this barfs, because it's expecting a field name "orderby" and there
> isn't one.  How do I evaluate that?
>
> ----------------------
> Andy Gates, Learning and Research Technology
> Andy.Gates@bristol.ac.uk - ICQ#74362415
> http://www.ilrt.bristol.ac.uk
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Diego Rodrigo Neufert
Webmaster / Web Developer - Magic Web Design
-----------------------------------------------------------
diego@magicwebdesign.com.br
www.magicwebdesign.com.br
Curitiba - PR - Brasil