Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
frontend:pager [2012/05/17 17:20]
giancarlo
frontend:pager [2012/05/29 13:13]
giancarlo
Line 1: Line 1:
-====== Custom Pager ======+====== Custom Pager and Collection rendering ======
  
 Edit xsl/sparql_to_html.xsl in Islandora module: Edit xsl/sparql_to_html.xsl in Islandora module:
  
 +<WRAP prewrap center>
 <code xml sparql_to_html.xsl> <code xml sparql_to_html.xsl>
 <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
Line 152: Line 153:
         </xsl:when>         </xsl:when>
         <xsl:otherwise>         <xsl:otherwise>
 +          <!--the below is an example of going straight to a datastream instead of the details page.
 +<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="s:title"/>-->
           <xsl:value-of select="concat($BASEURL, '/fedora/repository/', $PID)"/>           <xsl:value-of select="concat($BASEURL, '/fedora/repository/', $PID)"/>
         </xsl:otherwise>         </xsl:otherwise>
Line 157: Line 160:
       <xsl:value-of select="s:content"/>       <xsl:value-of select="s:content"/>
     </xsl:variable>     </xsl:variable>
-    <td valign="top" width="25%"> +    <xsl:choose> 
-      <table class="collcell"> +      <xsl:when test="($CONTENTMODEL='islandora:collectionCModel')"> 
-        <tr> +        <td valign="top" width="25%"
-          <td class="cellthumb" height="250px"> +          <table class="collcell1"> 
-            <a> +            <tr> 
-              <xsl:attribute name="href"> +              <td class="celldescr1"> 
-                <xsl:value-of select="$linkUrl"/> +                <xsl:value-of select="$newTitle" disable-output-escaping="yes"/> 
-              </xsl:attribute> +              </td> 
-              <img> +            </tr> 
-                <xsl:attribute name="src"> +            <tr> 
-                  <xsl:value-of select="concat($BASEURL, '/fedora/repository/', $PID, '/TN')"/> +              <td class="cellthumb1"> 
-                </xsl:attribute> +                <a> 
-                <xsl:attribute name="alt"> +                  <xsl:attribute name="href"> 
-                  <xsl:value-of select="$newTitle" disable-output-escaping="yes"/> +                    <xsl:value-of select="$linkUrl"/> 
-                </xsl:attribute> +                  </xsl:attribute> 
-              </img> +                  <img> 
-            </a> +                    <xsl:attribute name="src"> 
-            <br clear="all"/> +                      <xsl:value-of select="concat($BASEURL, '/fedora/repository/', $PID, '/TN')"/> 
-          </td> +                    </xsl:attribute> 
-        </tr> +                    <xsl:attribute name="alt"> 
-        <tr> +                      <xsl:value-of select="$newTitle" disable-output-escaping="yes"/> 
-          <td class="celldescr"> +                    </xsl:attribute> 
-            <xsl:choose> +                  </img> 
-              <xsl:when test="($CONTENTMODEL='islandora:pageCModel')">+                </a> 
 +                <!--            <br clear="all"/> --> 
 +                <xsl:if test="s:k0 &gt; 0"> 
 +    </xsl:if> 
 +              </td> 
 +            </tr> 
 +          </table> 
 +        </td
 +      </xsl:when> 
 +      <xsl:otherwise> 
 +        <td valign="top" width="25%"> 
 +          <table class="collcell"> 
 +            <tr> 
 +              <td class="cellthumb" height="250px"> 
 +                <a> 
 +                  <xsl:attribute name="href"> 
 +                    <xsl:value-of select="$linkUrl"/> 
 +                  </xsl:attribute> 
 +                  <img> 
 +                    <xsl:attribute name="src"> 
 +                      <xsl:value-of select="concat($BASEURL, '/fedora/repository/', $PID, '/TN')"/> 
 +                    </xsl:attribute> 
 +                    <xsl:attribute name="alt"> 
 +                      <xsl:value-of select="$newTitle" disable-output-escaping="yes"/> 
 +                    </xsl:attribute> 
 +                  </img> 
 +                </a> 
 +                <br clear="all"/> 
 +              </td> 
 +            </tr> 
 +            <tr> 
 +              <td class="celldescr"> 
 +                <xsl:choose> 
 +                  <xsl:when test="($CONTENTMODEL='islandora:pageCModel')">
             page <xsl:value-of select="substring-after($newTitle, '- page')" disable-output-escaping="yes"/>             page <xsl:value-of select="substring-after($newTitle, '- page')" disable-output-escaping="yes"/>
           </xsl:when>           </xsl:when>
-              <xsl:otherwise> +                  <xsl:otherwise> 
-                <xsl:value-of select="$newTitle" disable-output-escaping="yes"/> +                    <xsl:value-of select="$newTitle" disable-output-escaping="yes"/> 
-              </xsl:otherwise> +                  </xsl:otherwise> 
-            </xsl:choose> +                </xsl:choose> 
-          </td> +              </td> 
-        </tr> +            </tr> 
-      </table> +          </table> 
-    </td>+        </td
 +      </xsl:otherwise> 
 +    </xsl:choose>
     <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">     <xsl:if test="(position() = last()) and (position() &lt; $cellsPerRow)">
       <xsl:call-template name="FillerCells">       <xsl:call-template name="FillerCells">
Line 230: Line 268:
 </xsl:stylesheet> </xsl:stylesheet>
 </code> </code>
 +</WRAP>
 
 
frontend/pager.txt · Last modified: 2012/05/29 13:13 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki