You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by olivier demah <od...@messagio.com> on 2004/05/07 11:34:21 UTC
Paginator Transformer
Hi,
i use http://cocoon.apache.org/2.1/howto/howto-paginator-transformer.html
but the paginator is displaying at the bottom of my page and i need to
display it just under the data i paginate ; because the bottom of my
page dont have to be the paginator :
example :
here its what i want
-news-
date1 title1
date2 title2
....
date10 title10
[page 1 of 8] >>
-agenda-
date1 event1
date2 event2
----
<<Back to the home page
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
and here its what i currently have :
-news-
date1 title1
date2 title2
....
date10 title10
-agenda-
date1 event1
date2 event2
[page 1 of 8] >>
----
<<Back to the home page
the XSL part that manage the paginator is the following (extract as is
from the official URL past previously) :
<xsl:template match="page:page">
<xsl:if test="@total > 1">
<!-- page navigation table -->
<table border="0" align="center">
<tr>
<!-- td prev -->
<td align="right">
<b>
<xsl:if test="page:link[@type='prev']">
<xsl:variable name="previous" select="@current - 1"/>
<a href="{page:link[@page = $previous]/@uri}">« prev</a>
</xsl:if>
</b>
</td>
<!-- td current -->
<td align="center">
[page <xsl:value-of select="@current"/> of <xsl:value-of
select="@total"/>]
</td>
<!-- td next -->
<td align="left">
<xsl:if test="page:link[@type='next']">
<xsl:variable name="next" select="@current + 1"/>
<a href="{page:link[@page = $next]/@uri}">next »</a>
</xsl:if>
</td>
</tr>
</table>
</xsl:if>
</xsl:template>
Now , i really dont know how i can "mix" a contain that i want to
"paginate" with one i dont...
And if i could do
<xsl:template name="page:page"> instead of <xsl:template
match="page:page"> that was better ; but i think the Paginator dont use
somthing like call-templates ...
Regards
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Paginator Transformer
Posted by Joerg Heinicke <jo...@gmx.de>.
On 07.05.2004 11:34, olivier demah wrote:
> Hi,
> i use http://cocoon.apache.org/2.1/howto/howto-paginator-transformer.html
> but the paginator is displaying at the bottom of my page and i need to
> display it just under the data i paginate ; because the bottom of my
> page dont have to be the paginator :
<snipped what="example"/>
> Now , i really dont know how i can "mix" a contain that i want to
> "paginate" with one i dont...
>
> And if i could do
> <xsl:template name="page:page"> instead of <xsl:template
> match="page:page"> that was better ; but i think the Paginator dont use
> somthing like call-templates ...
Not really. That only might make it more obvious. The xsl code you
quoted seemed to be from the Cocoon dist, isn't it? The
<xsl:apply-templates/> in the first template leads to the "wrong order".
You need to apply templates more selectively and apply the template for
page:page exactly at the place you need it - this would also be the
place where you would use call-template.
Try to look at the paginator output before it is transformed to HTML.,
this should help to write the stylesheet for the "correct order".
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org