Code Comments
Programming Forum and web based access to our favorite programming groups.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.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.