Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Iterations
I using SmartyPaginate plugin to paginate result obtains from a query. The q
uestions is I need to know the iteration number depending of page I stay. Ta
ke a look to this code:

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

<table width="100%"  border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tdright">{$paginate.first} - {$paginate.last} {$paginate.total}</
td>
</tr>
</table>
{section name="guestbook_data" loop=$arrUsName}
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="table
">
<tr>
<td colspan="8" class="th">Mostrando firma {$smarty.section.guestbook_data.i
teration}</td>
</tr>
<tr>
<td width="79%" class="padding-td">Firmado por: {$arrUsName[guestbook_data]}
</td>
<td width="3%" class="image">
{if $arrUsEmail[guestbook_data] neq ""}
<img src="themes/images/contacticon.gif" alt="{$arrUsEmail[guestbook_data]}"
>
{/if}
</td>
<td width="3%" class="image">
{if $arrUsCountry[guestbook_data] neq ""}
<img src="themes/images/users/world.gif" alt="{$arrUsCountry[guestbook_data]
}">
{/if}
</td>
<td width="3%" class="image">
{if $arrUsWebSite[guestbook_data] neq ""}
<a href="{$arrUsWebSite[guestbook_data]}" target="_blank"><img src="themes/i
mages/users/website.gif" border="0" alt="{$arrUsWebSite[guestbook_data]}"></
a>
{/if}
</td>
<td width="3%" class="image">
{if $arrUsYim[guestbook_data] neq ""}
<img src="themes/images/users/yim.gif" alt="{$arrUsYim[guestbook_data]}">
{/if}
</td>
<td width="3%" class="image">
{if $arrUsMsn[guestbook_data] neq ""}
<img src="themes/images/users/msn.gif" alt="{$arrUsMsn[guestbook_data]}">
{/if}
</td>
<td width="3%" class="image">
{if $arrUsIcq[guestbook_data] neq ""}
<img src="themes/images/users/icq.gif" alt="{$arrUsIcq[guestbook_data]}">
{/if}
</td>
<td width="3%" class="image">
{if $arrUsAim[guestbook_data] neq ""}
<img src="themes/images/users/aim.gif" alt="{$arrUsAim[guestbook_data]}">
{/if}
</td>
</tr>
<tr>
<td colspan="8" valign="top" class="padding-td"><strong>Comentarios:</strong
> {$arrUsComments[guestbook_data]|nl2br}</td>
</tr>
</table><br>
{/section}
<table width="100%"  border="0" cellspacing="1" cellpadding="0">
<tr>
<td class="tdright">{paginate_prev} {paginate_middle} {paginate_next}</td>
</tr>
</table>

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

When I stay in first page in wich $next var have 0 or 1 value all is ok, {$s
marty.section.guestbook_data.iteration } show me 10 values but when I move t
o another page and $next var take another value like 2 for example {$smarty.
section.guestbook_data.iteration } show me tha same values when I want to be
gin in 11 and show even 20? 

How I can solve this?

Reynier Pérez Mira

3ero. Ing. Informática

Entre más inteligente me siento, más me doy cuenta de lo ignorante que soy. 

 



Report this thread to moderator Post Follow-up to this message
Old Post
Reynier Perez Mira
04-11-05 09:02 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:12 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.