[rt-users] number tickets returned by a search?
Grant Miller
grant at pico.apple.com
Fri Oct 4 22:31:30 EDT 2002
On Fri, Oct 04, 2002 at 01:57:17PM -0700, Grant Miller wrote:
>
>
> I'm trying to put a little text into Search/Listing.html to tell the user
> how many tickets were returned in the search they just ran.
>
> I have this:
> Number of tickets returned in search:
> <%$session{'tickets'}->Count()%>
>
> But that's not really useful. If you ran a search that brings back
> 100 tickets and you have your $session{'tickets_rows_per_page'} set at
> 25, $session{'tickets'}->Count() will say 25. I want to get the total
> number of tickets in a search, not just the ones displayed on the
> page at the moment.
>
I figured it out, had to get the count right after
$session{'tickets'}->RedoSearch();
Then I put in
%if ($ticketcount > $session{'tickets_rows_per_page'}) {
<a href="Listing.html?GotoPage=1">First page</a>
<a href="Listing.html?GotoPage=Prev"><Previous page</a>
<a href="Listing.html?GotoPage=Next">Next page></a>
%}
To have it only show those links if there's more than a page of tickets
returned.
--
-Grant Miller grant at pico.apple.com x42917
Unix Systems Admin, Engineering Computer Services
unix-support at pico.apple.com, http://www-ecs.apple.com
ECS Hotline: x44747
More information about the rt-users
mailing list