Show
Ignore:
Timestamp:
04/03/11 01:46:20 (14 years ago)
Author:
František Kučera <franta-hg@…>
Branch:
default
Message:

genrování hlavní nabídky #1
Stránky, které mají být v nabídce, musí obsahovat značku <pořadí>123</pořadí>,
podle které se pak položky řadí.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • šablona/stránka.xsl

    r3 r4  
    2323                                <h1><xsl:value-of select="g:stránka/g:nadpis"/></h1> 
    2424                                <xsl:apply-templates select="g:stránka/h:text/node()"/> 
     25                                <ul id="nabídka"> 
     26                                        <xsl:for-each select="collection('../vstup/?select=*.xml')[g:stránka/g:pořadí]"> 
     27                                                <xsl:sort select="empty(./g:stránka/g:pořadí)"/> 
     28                                                <xsl:sort select="./g:stránka/g:pořadí"/> 
     29                                                <li> 
     30                                                        <xsl:variable name="xmlSoubor" select="tokenize(document-uri(.), '/')[last()]"/> 
     31                                                        <xsl:variable name="xhtmlSoubor" select="replace($xmlSoubor, '.xml', '.xhtml')"/> 
     32                                                        <a href="{fn:encode-for-uri($xhtmlSoubor)}"><xsl:value-of select="./g:stránka/g:nadpis"/></a> 
     33                                                </li> 
     34                                        </xsl:for-each> 
     35                                </ul> 
    2536                                <xsl:apply-templates select="document(fn:encode-for-uri('../vstup/zápatí.inc'))/g:stránka/h:text/node()"/>                               
    2637                        </body>