戻口口口口
口口口口口
口口口口口
口口口口口
口口口口進
「戻」と「進」はナビゲーション、「口」は画像です。
前ページ、後ページがあるときは、上記のように表示し、それぞれ存在しない時はそこに普通に画像を表示したいと思うのですが、上手くいきません。
整形や表示位置指定までは何とかなったのですが、ナビゲーションボタンを分離して設置するTIPSが見つけられなかったのでご質問させていただきました。
一応、当方のデザイン定義ををここに貼ります。(整形に関してはこの掲示板を参考になんとかごまかして表示しております)
25件表示で、データは25件以上あるのですが、以下の定義だと、単に1件目と25件目が非表示になり、ソースを見ても何も表示されて居ない状態です。
条件付けが間違ってるのか、あるいはnaviの指定方法がおかしいのか、いまひとつ判断がつきませんでした。
このようなナビゲーションの配置は可能でしょうか?
お手数ですがよろしくお願いいたします。
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="EUC-JP" omit-xml-declaration="yes" />
<xsl:template match="/entrylist">
<div class="cellcontainer">
<xsl:for-each select="entry">
<div class="cell">
<div class="padding">
<xsl:choose>
<xsl:when test="position() mod 25=1">
<xsl:for-each select="navi">
<xsl:for-each select="prev">
<a href="{@href}"><img src="img/back.gif" border="0"/></a>
</xsl:for-each>
<xsl:if test="not(prev)"><img src="img/back.gif" /></xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="position() mod 25=0">
<xsl:for-each select="navi">
<xsl:for-each select="next">
<a href="{@href}"><img src="img/next.gif" /></a>
</xsl:for-each>
<xsl:if test="not(next)"><img src="img/next.gif" /></xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:if test="image/text()">
<a href="javascript:void(0)" onClick="window.open('{image}', 'newwin', 'width={image/@width},height={image/@height},scrollbars=1')"><img src="{image}&w=40&h=40" /></a>
</xsl:if>
<xsl:if test="not(image/text())">
<img src="img/noimage.gif" />
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>