|
From: Chris N. <pu...@po...> - 2001-04-12 18:32:24
|
At 21:15 +0200 2001.04.12, as...@en... wrote:
>> Well, if index.pl is set to a particular section, you should be able to
>get
>> it with $form.section, since that is the only way I know of to set
>index.pl
>> to a particular section.
>>
>> Chris Nandor pu...@po...
>
>Ah yes, form.section does the trick! Thank you.
>
>Well, half of it: does index.pl also know the section's display title? I
>don't have too many so I can just do a loop within the template, ie,
>
>[% IF form.section == "courses"]
>Seminars & Courses
>[% END %]
>
>but I'd prefer to do it more cleanly if the data's accessible.
[% USE Slash; sections = Slash.db.getDescriptions("sections") %]
[% sections.${form.section} %]
Now, there is an extra performance hit to call the getDescriptions method
(did you know you can call any Slash::DB method that way?), but the data is
cached, so it is not a big hit as far as data access is concerned.
--
Chris Nandor pu...@po... http://pudge.net/
Open Source Development Network pu...@os... http://osdn.com/
|