TitleExtension

From Plex-XML
(Difference between revisions)
Jump to: navigation, search
 
Line 12: Line 12:
 
   <xsl:variable name="vFoo"><xsl:value-of select="$vPath/returnvalue[@name='Foo']/@value" /></xsl:variable>
 
   <xsl:variable name="vFoo"><xsl:value-of select="$vPath/returnvalue[@name='Foo']/@value" /></xsl:variable>
 
   <xsl:text>: </xsl:text><xsl:value-of select="$vFoo"/>
 
   <xsl:text>: </xsl:text><xsl:value-of select="$vFoo"/>
 +
  <xsl:call-template name="titleSubtitle"/>
 
</xsl:template>  
 
</xsl:template>  
 
</pre>
 
</pre>
Line 19: Line 20:
 
   <xsl:param name="vHeader"/>
 
   <xsl:param name="vHeader"/>
 
   <title><img src="/object/history32.png"/> <xsl:value-of select="$vHeader"/></title>
 
   <title><img src="/object/history32.png"/> <xsl:value-of select="$vHeader"/></title>
 +
  <xsl:call-template name="titleSubtitle"/>
 
  </xsl:template>
 
  </xsl:template>
  

Latest revision as of 13:39, 15 October 2015

The titleExtension template extends the title element that is filled with an translated value from the format definition.


See also TitleSubtitle.

Contents

Properties

Example

Put the following template in your xslt to override the empty default template. In the example below the title is extended by ": fooValue".

<xsl:template name="titleExtension">  
  <xsl:variable name="vFoo"><xsl:value-of select="$vPath/returnvalue[@name='Foo']/@value" /></xsl:variable>
  <xsl:text>: </xsl:text><xsl:value-of select="$vFoo"/>
  <xsl:call-template name="titleSubtitle"/>
</xsl:template> 

Image + Title

<xsl:template name="headerTitle">
 <xsl:param name="vHeader"/>
 <title><img src="/object/history32.png"/> <xsl:value-of select="$vHeader"/></title>
 <xsl:call-template name="titleSubtitle"/>
</xsl:template>

Hints

Hide title

<xsl:template name="headerTitle">
</xsl:template>


Application title

<xsl:template name="apptitle">
 <title>
  <xsl:value-of select="$vTitle"/>
 </title>
</xsl:template>
Personal tools