Ik maak gebruik van Smarty ( http://smarty.php.net ). Maar ik heb een beetje problemen met cycle, deze is ontzettend traag. Over 30 cycles doet hij 2,5 seconden terwijl hij zonder cycle in 0,4 seconden klaar is. 
Heeft iemand ervaring met die probleem?
Dit is mijn template
Heeft iemand ervaring met die probleem?
Dit is mijn template
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| <TABLE width='100%' > <TR><% math assign=totalpages format="%d" equation="a / b +1" a=$list.total b=$list.pagesize|default:1 %> <TD><% if $list.currentpage > 1 %><A HREF="<% $SCRIPT_NAME %>?<% $list.prevpage %>"> << </a><% /if %></TD> <TD ALIGN=CENTER>page <% $list.currentpage %> of <% $totalpages %></TD> <TD ALIGN="RIGHT"><% if $list.currentpage < $totalpages %> <A HREF="<% $SCRIPT_NAME %>?<% $list.nextpage %>"> >> </a><% /if %></TD> </TR> </TABLE> <TABLE width='100%' CELLPADDING=1 CELLSPACING=0> <TR VALIGN='TOP'> <TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.firstname.querie %>'><% $list.header.firstname.name %></TD> <TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.lastname.querie %>'><% $list.header.lastname.name %></TD> <TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.department.querie %>'><% $list.header.department.name %></TD> <TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.location.querie %>'><% $list.header.location.name %></TD> <TD><A HREF='<% $SCRIPT_NAME %>?<% $list.header.extension.querie %>'><% $list.header.extension.name %></TD> </TR> <% cycle values="tabel,tabel2" print=0 %> <% foreach from=$list.data item=rows %> <TR onmouseover="setPointer(this, 'over', '#DDDDDD', '#99CC99', '#FFCC99')" onmouseout="setPointer(this, 'out', '#DDDDDD', '#99CC99', '#FFCC99')" onmousedown="setPointer(this, 'click', '#DDDDDD', '#99CC99', '#FFCC99')" VALIGN='TOP' CLASS='<% cycle %>'> <TD><% if $rows.emailadress != "" %> <A HREF='mailto:<% $rows.emailadress %>' title="Email <% $rows.firstname %> <% $rows.lastname %>"><%/if%> <% $rows.firstname %></a></TD> <TD><% $rows.lastname %></TD> <TD><% $rows.department %></TD> <TD><NOBR><% $rows.location %></NOBR></TD> <TD><% $rows.extension %></TD> </TR> <% /foreach %> </TABLE> |
[ Voor 84% gewijzigd door LuCarD op 16-01-2003 17:08 ]
Programmer - an organism that turns coffee into software.