xsl-list
[Top] [All Lists]

[xsl] pagination - From PHP To XSL - Recursion ?

2008-02-02 08:24:06
Hello, i want to calculate and to catch the final result of the variables $_pagi_nav_desde and $_pagi_nav_hasta to pass them to one template. I don´t know to make it in XSL, because i know that in XSL the variables can´t to change. Can you help me, please?

Cheers,
Alexander


//  PHP Code//

$_pagi_nav_desde = $_pagi_actual - $_pagi_nav_intervalo;
$_pagi_nav_hasta = $_pagi_actual + $_pagi_nav_intervalo;


if($_pagi_nav_desde < 1){
         $_pagi_nav_hasta -= ($_pagi_nav_desde - 1);
         $_pagi_nav_desde = 1;
}

if($_pagi_nav_hasta > $_pagi_totalPags){
     $_pagi_nav_desde -= ($_pagi_nav_hasta - $_pagi_totalPags);
     $_pagi_nav_hasta = $_pagi_totalPags;

     if($_pagi_nav_desde < 1){
          $_pagi_nav_desde = 1;
     }
}

************************************************

// XSL Code //
<xsl:call-template name="pagination-item">
       <xsl:with-param name="current" select="$curpage"/>
       <xsl:with-param name="p" select="$_pagi_nav_desde"/>  ??
       <xsl:with-param name="last" select="$_pagi_nav_hasta"/>   ??
       <xsl:with-param name="script" select="$script"/>
</xsl:call-template>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--